diff options
| author | kennykos <“gkosmacher01@gmail.com”> | 2023-02-15 16:06:05 -0600 |
|---|---|---|
| committer | kennykos <“gkosmacher01@gmail.com”> | 2023-02-15 16:06:05 -0600 |
| commit | b6b578249e447614f7a9e07c7b2343e625d21101 (patch) | |
| tree | 9f0e68432200809698b0ec230d2125c309204f57 | |
| parent | 49cbd4bbe57cb81c63c564343b8f85186ea58b21 (diff) | |
setup directory for conda setup
Added setup directory for conda setup
| -rw-r--r-- | setup/checks/check_for_conda.sh | 11 | ||||
| -rw-r--r-- | setup/environment.yml | 126 | ||||
| -rw-r--r-- | setup/setup.sh | 14 | ||||
| -rw-r--r-- | setup/setup_conda.sh | 22 | ||||
| -rw-r--r-- | setup/teardown.sh | 3 | ||||
| -rw-r--r-- | setup/teardown_conda.sh | 9 |
6 files changed, 185 insertions, 0 deletions
diff --git a/setup/checks/check_for_conda.sh b/setup/checks/check_for_conda.sh new file mode 100644 index 0000000..b17bc1a --- /dev/null +++ b/setup/checks/check_for_conda.sh @@ -0,0 +1,11 @@ +#taken from mobilitynet-analysis-scripts/setup/checks/check_for_conda.sh + +CURR_CONDA_VER=`conda --version | cut -d " " -f 2` +EXP_CONDA_VER=23.1.0 + +if [ $CURR_CONDA_VER == $EXP_CONDA_VER ]; then + echo "For conda, found $CURR_CONDA_VER, expected $EXP_CONDA_VER, all is good!" +else + echo "For conda, found $CURR_CONDA_VER, expected $EXP_CONDA_VER, run 'bash setup/setup_conda.sh $EXP_CONDA_VER <platform>' to get the correct version" + echo "Or install manually after downloading from https://repo.anaconda.com/miniconda/" +fi diff --git a/setup/environment.yml b/setup/environment.yml new file mode 100644 index 0000000..c72a998 --- /dev/null +++ b/setup/environment.yml @@ -0,0 +1,126 @@ +name: toriis +channels: + - defaults +dependencies: + - _libgcc_mutex=0.1=main + - _openmp_mutex=5.1=1_gnu + - anyio=3.5.0=py310h06a4308_0 + - argon2-cffi=21.3.0=pyhd3eb1b0_0 + - argon2-cffi-bindings=21.2.0=py310h7f8727e_0 + - asttokens=2.0.5=pyhd3eb1b0_0 + - attrs=22.1.0=py310h06a4308_0 + - babel=2.11.0=py310h06a4308_0 + - backcall=0.2.0=pyhd3eb1b0_0 + - beautifulsoup4=4.11.1=py310h06a4308_0 + - blas=1.0=mkl + - bleach=4.1.0=pyhd3eb1b0_0 + - bottleneck=1.3.5=py310ha9d4c09_0 + - brotlipy=0.7.0=py310h7f8727e_1002 + - bzip2=1.0.8=h7b6447c_0 + - ca-certificates=2023.01.10=h06a4308_0 + - certifi=2022.12.7=py310h06a4308_0 + - cffi=1.15.1=py310h5eee18b_3 + - charset-normalizer=2.0.4=pyhd3eb1b0_0 + - comm=0.1.2=py310h06a4308_0 + - cryptography=38.0.4=py310h9ce1e76_0 + - debugpy=1.5.1=py310h295c915_0 + - decorator=5.1.1=pyhd3eb1b0_0 + - defusedxml=0.7.1=pyhd3eb1b0_0 + - entrypoints=0.4=py310h06a4308_0 + - executing=0.8.3=pyhd3eb1b0_0 + - flit-core=3.6.0=pyhd3eb1b0_0 + - icu=58.2=he6710b0_3 + - idna=3.4=py310h06a4308_0 + - intel-openmp=2021.4.0=h06a4308_3561 + - ipykernel=6.19.2=py310h2f386ee_0 + - ipython=8.9.0=py310h06a4308_0 + - ipython_genutils=0.2.0=pyhd3eb1b0_1 + - jedi=0.18.1=py310h06a4308_1 + - jinja2=3.1.2=py310h06a4308_0 + - json5=0.9.6=pyhd3eb1b0_0 + - jsonschema=4.16.0=py310h06a4308_0 + - jupyter_client=7.4.9=py310h06a4308_0 + - jupyter_core=5.1.1=py310h06a4308_0 + - jupyter_server=1.23.4=py310h06a4308_0 + - jupyterlab=3.5.3=py310h06a4308_0 + - jupyterlab_pygments=0.1.2=py_0 + - jupyterlab_server=2.16.5=py310h06a4308_0 + - ld_impl_linux-64=2.38=h1181459_1 + - libffi=3.4.2=h6a678d5_6 + - libgcc-ng=11.2.0=h1234567_1 + - libgomp=11.2.0=h1234567_1 + - libsodium=1.0.18=h7b6447c_0 + - libstdcxx-ng=11.2.0=h1234567_1 + - libuuid=1.41.5=h5eee18b_0 + - libxml2=2.9.14=h74e7548_0 + - libxslt=1.1.35=h4e12654_0 + - lxml=4.9.1=py310h1edc446_0 + - markupsafe=2.1.1=py310h7f8727e_0 + - matplotlib-inline=0.1.6=py310h06a4308_0 + - mistune=0.8.4=py310h7f8727e_1000 + - mkl=2021.4.0=h06a4308_640 + - mkl-service=2.4.0=py310h7f8727e_0 + - mkl_fft=1.3.1=py310hd6ae3a3_0 + - mkl_random=1.2.2=py310h00e6091_0 + - nbclassic=0.4.8=py310h06a4308_0 + - nbclient=0.5.13=py310h06a4308_0 + - nbconvert=6.5.4=py310h06a4308_0 + - nbformat=5.7.0=py310h06a4308_0 + - ncurses=6.4=h6a678d5_0 + - nest-asyncio=1.5.6=py310h06a4308_0 + - notebook=6.5.2=py310h06a4308_0 + - notebook-shim=0.2.2=py310h06a4308_0 + - numexpr=2.8.4=py310h8879344_0 + - numpy=1.23.5=py310hd5efca6_0 + - numpy-base=1.23.5=py310h8e6c178_0 + - openssl=1.1.1t=h7f8727e_0 + - packaging=22.0=py310h06a4308_0 + - pandas=1.5.2=py310h1128e8f_0 + - pandocfilters=1.5.0=pyhd3eb1b0_0 + - parso=0.8.3=pyhd3eb1b0_0 + - pexpect=4.8.0=pyhd3eb1b0_3 + - pickleshare=0.7.5=pyhd3eb1b0_1003 + - pip=22.3.1=py310h06a4308_0 + - platformdirs=2.5.2=py310h06a4308_0 + - prometheus_client=0.14.1=py310h06a4308_0 + - prompt-toolkit=3.0.36=py310h06a4308_0 + - psutil=5.9.0=py310h5eee18b_0 + - ptyprocess=0.7.0=pyhd3eb1b0_2 + - pure_eval=0.2.2=pyhd3eb1b0_0 + - pycparser=2.21=pyhd3eb1b0_0 + - pygments=2.11.2=pyhd3eb1b0_0 + - pyopenssl=22.0.0=pyhd3eb1b0_0 + - pyrsistent=0.18.0=py310h7f8727e_0 + - pysocks=1.7.1=py310h06a4308_0 + - python=3.10.9=h7a1cb2a_0 + - python-dateutil=2.8.2=pyhd3eb1b0_0 + - python-fastjsonschema=2.16.2=py310h06a4308_0 + - pytz=2022.7=py310h06a4308_0 + - pyzmq=23.2.0=py310h6a678d5_0 + - readline=8.2=h5eee18b_0 + - requests=2.28.1=py310h06a4308_0 + - send2trash=1.8.0=pyhd3eb1b0_1 + - setuptools=65.6.3=py310h06a4308_0 + - six=1.16.0=pyhd3eb1b0_1 + - sniffio=1.2.0=py310h06a4308_1 + - soupsieve=2.3.2.post1=py310h06a4308_0 + - sqlite=3.40.1=h5082296_0 + - stack_data=0.2.0=pyhd3eb1b0_0 + - terminado=0.17.1=py310h06a4308_0 + - tinycss2=1.2.1=py310h06a4308_0 + - tk=8.6.12=h1ccaba5_0 + - tomli=2.0.1=py310h06a4308_0 + - tornado=6.2=py310h5eee18b_0 + - traitlets=5.7.1=py310h06a4308_0 + - typing-extensions=4.4.0=py310h06a4308_0 + - typing_extensions=4.4.0=py310h06a4308_0 + - tzdata=2022g=h04d1e81_0 + - urllib3=1.26.14=py310h06a4308_0 + - wcwidth=0.2.5=pyhd3eb1b0_0 + - webencodings=0.5.1=py310h06a4308_1 + - websocket-client=0.58.0=py310h06a4308_4 + - wheel=0.37.1=pyhd3eb1b0_0 + - xz=5.2.10=h5eee18b_1 + - zeromq=4.3.4=h2531618_0 + - zlib=1.2.13=h5eee18b_0 +prefix: /home/gabrielkosmacher/miniconda3/envs/toriis diff --git a/setup/setup.sh b/setup/setup.sh new file mode 100644 index 0000000..d2631f9 --- /dev/null +++ b/setup/setup.sh @@ -0,0 +1,14 @@ +#taken from mobilitynet-analysis-scripts/setup/setup.sh +# If the conda binary is not found, specify the full path to it +# you can find it by searching for "conda" under the miniconda3 directory +# typical paths are: +# - on linux: /home/<user>/miniconda3/bin/conda +# - on OSX: /Users/<user>/miniconda3/bin/conda +# - on Windows: C:/Users/<user>/Miniconda3/Scripts/conda + +set -e + +source setup/checks/check_for_conda.sh + +conda env update --name toriis --file setup/environment.yml +conda activate toriis diff --git a/setup/setup_conda.sh b/setup/setup_conda.sh new file mode 100644 index 0000000..e7d4e3e --- /dev/null +++ b/setup/setup_conda.sh @@ -0,0 +1,22 @@ +# taken from mobilitynet-analysis-scripts/setup/setup_conda.sh +EXP_CONDA_VER=$1 +PLATFORM=$2 +echo "Installing for version $EXP_CONDA_VER and platform $PLATFORM" + +if [[ -z $EXP_CONDA_VER || -z $PLATFORM ]]; then + echo "Usage: setup_conda.sh <version> <platform>" + echo " Platform options are Linux-x86_64, MacOSX-x86_64" + echo " For Windows, manually download and install https://repo.anaconda.com/miniconda/Miniconda3-$EXP_CONDA_VER-Windows-x86_64.exe" +else + INSTALL_PREFIX=$HOME/miniconda-$EXP_CONDA_VER + SOURCE_SCRIPT="$HOME/miniconda-$EXP_CONDA_VER/etc/profile.d/conda.sh" + + curl -o miniconda.sh -L https://repo.continuum.io/miniconda/Miniconda3-$EXP_CONDA_VER-$PLATFORM.sh; + bash miniconda.sh -b -p $INSTALL_PREFIX + source $SOURCE_SCRIPT + hash -r + conda config --set always_yes yes --set changeps1 no + # Useful for debugging any issues with conda + conda info -a + echo "Successfully installed at $INSTALL_PREFIX. Please run 'source $SOURCE_SCRIPT' in every terminal where you want to use conda" +fi diff --git a/setup/teardown.sh b/setup/teardown.sh new file mode 100644 index 0000000..308fde8 --- /dev/null +++ b/setup/teardown.sh @@ -0,0 +1,3 @@ +# taken from mobilitynet-analysis-scripts/setup/teardown.sh +conda activate base +conda env remove --name toriis diff --git a/setup/teardown_conda.sh b/setup/teardown_conda.sh new file mode 100644 index 0000000..2fde7a5 --- /dev/null +++ b/setup/teardown_conda.sh @@ -0,0 +1,9 @@ +# taken from mobilitynet-analysis-scripts/setup/teardown_conda.sh +EXP_CONDA_VER=$1 + +if [ -z $EXP_CONDA_VER ]; then + echo "Usage: teardown_conda.sh <version>" +else + INSTALL_PREFIX=$HOME/miniconda-$EXP_CONDA_VER + rm -rf $INSTALL_PREFIX +fi |
