Skip to content

Commit

Permalink
Further housekeeping of installation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
papamarkou committed Dec 3, 2020
1 parent 6dc7594 commit a468272
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 53 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

MCMC methods for neural networks.

eeyore can be installed using anaconda or pip. The anaconda installation does not include ODE modelling functionalilty based
on torchdiffeq.
eeyore can be installed using pip or anaconda. The anaconda installation does not include ODE modelling functionalilty based on torchdiffeq.

To install eeyore using pip, run
```
pip install eeyore
```

To install eeyore using anaconda, firstly add the required channels by running
```
Expand All @@ -18,8 +22,3 @@ To install eeyore using anaconda without adding any channels, run
```
conda install -c papamarkou -c pytorch -c conda-forge eeyore
```

To install eeyore using pip, run
```
pip install eeyore
```
2 changes: 1 addition & 1 deletion eeyore/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.12'
__version__ = '0.0.13'
2 changes: 1 addition & 1 deletion installation/anaconda.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ anaconda login
```
cd $HOME
conda skeleton pypi eeyore
conda build --python 3.8 eeyore
conda build --python 3.6 eeyore
```

### Upload to anaconda
Expand Down
31 changes: 0 additions & 31 deletions installation/dev.md

This file was deleted.

33 changes: 33 additions & 0 deletions installation/dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# Start up script for setting up environment on Ubuntu 20.04 LTS

export PKGNAME='eeyore'
export PYVERSION='3.6'
export CONDADIR="$HOME/opt/continuum/miniconda/miniconda3"
export PYPKGDIR="$HOME/opt/python/packages"
export CONDABIN="$CONDADIR/bin/conda"
export CONDASCRIPT='Miniconda3-latest-Linux-x86_64.sh'
export PKGURL="https://github.com/papamarkou/$PKGNAME.git"

sudo apt-get update

sudo apt-get install tree

wget https://repo.anaconda.com/miniconda/$CONDASCRIPT
chmod u+x $CONDASCRIPT

$SHELL $CONDASCRIPT -b -p $CONDADIR

$CONDABIN create -n $PKGNAME -y python=$PYVERSION

$CONDABIN init $(basename $SHELL)
$CONDABIN config --set auto_activate_base false

mkdir -p $PYPKGDIR
cd $PYPKGDIR
git clone $PKGURL
cd $PKGNAME
python setup.py develop --user

rm $CONDASCRIPT
2 changes: 1 addition & 1 deletion installation/gcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ gcloud compute instances create \
--image-family=ubuntu-2004-lts \
--no-restart-on-failure \
--maintenance-policy=terminate \
--metadata-from-file startup-script=gstartup.sh
--metadata-from-file startup-script=gdev.sh
36 changes: 36 additions & 0 deletions installation/gdev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Start up script for setting up environment on Ubuntu 20.04 LTS

export METAUSER='theodore'
export BASEDIR="/home/$METAUSER"
export PKGNAME='eeyore'
export PYVERSION='3.6'
export CONDADIR="$HOME/opt/continuum/miniconda/miniconda3"
export PYPKGDIR="$HOME/opt/python/packages"
export CONDABIN="$CONDADIR/bin/conda"
export CONDASCRIPT='Miniconda3-latest-Linux-x86_64.sh'
export PKGURL="https://github.com/papamarkou/$PKGNAME.git"

sudo apt-get update

sudo apt-get install tree

su - $METAUSER -c "wget https://repo.anaconda.com/miniconda/$CONDASCRIPT"
su - $METAUSER -c "chmod u+x $CONDASCRIPT"

su - $METAUSER -c "$SHELL $CONDASCRIPT -b -p $CONDADIR"

su - $METAUSER -c "$CONDABIN create -n $PKGNAME -y python=$PYVERSION"

su - $METAUSER -c "$CONDABIN init $(basename $SHELL)"
su - $METAUSER -c "$CONDABIN config --set auto_activate_base false"

su - $METAUSER -c "mkdir -p $PYPKGDIR;
cd $PYPKGDIR;
git clone $PKGURL;
cd $PKGNAME;
$CONDABIN activate $PKGNAME;
python setup.py develop --user"

rm $CONDASCRIPT
11 changes: 4 additions & 7 deletions installation/gstartup.sh → installation/gstable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@

# Start up script for setting up environment on Ubuntu 20.04 LTS

METAUSER='theodore'
BASEDIR="/home/$METAUSER"

export METAUSER='theodore'
export BASEDIR="/home/$METAUSER"
export PKGNAME='eeyore'

export PYVERSION='3.6'
export CONDADIR="$BASEDIR/opt/continuum/miniconda/miniconda3"

export CONDABIN="$CONDADIR/bin/conda"

export CONDASCRIPT='Miniconda3-latest-Linux-x86_64.sh'

sudo apt-get update
Expand All @@ -22,7 +19,7 @@ su - $METAUSER -c "chmod u+x $CONDASCRIPT"

su - $METAUSER -c "$SHELL $CONDASCRIPT -b -p $CONDADIR"

su - $METAUSER -c "$CONDABIN create -n $PKGNAME -y -c papamarkou -c pytorch -c conda-forge python=3.8 $PKGNAME"
su - $METAUSER -c "$CONDABIN create -n $PKGNAME -y -c papamarkou -c pytorch -c conda-forge python=$PYVERSION $PKGNAME"

su - $METAUSER -c "$CONDABIN init $(basename $SHELL)"
su - $METAUSER -c "$CONDABIN config --set auto_activate_base false"
Expand Down
2 changes: 1 addition & 1 deletion installation/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "eeyore" %}
{% set version = "0.0.12" %}
{% set version = "0.0.13" %}

package:
name: "{{ name|lower }}"
Expand Down
6 changes: 2 additions & 4 deletions installation/startup.sh → installation/stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
# Start up script for setting up environment on Ubuntu 20.04 LTS

export PKGNAME='eeyore'

export PYVERSION='3.6'
export CONDADIR="$HOME/opt/continuum/miniconda/miniconda3"

export CONDABIN="$CONDADIR/bin/conda"

export CONDASCRIPT='Miniconda3-latest-Linux-x86_64.sh'

sudo apt-get update
Expand All @@ -19,7 +17,7 @@ chmod u+x $CONDASCRIPT

$SHELL $CONDASCRIPT -b -p $CONDADIR

$CONDABIN create -n $PKGNAME -y -c papamarkou -c pytorch -c conda-forge python=3.8 $PKGNAME
$CONDABIN create -n $PKGNAME -y -c papamarkou -c pytorch -c conda-forge python=$PYVERSION $PKGNAME

$CONDABIN init $(basename $SHELL)
$CONDABIN config --set auto_activate_base false
Expand Down

0 comments on commit a468272

Please sign in to comment.