This article will guide you to create the environment using Miniconda on a LANTA HPC system. An overview of the content can be found in the table of contents below for immediate visualization of the interesting parts.
Table of Contents |
---|
Using Mamba on LANTA HPC
Load Mamba module
Use the
ml av Mamba
command to see which version of Mamba is available on the LANTA HPC system.Use the
ml Mamba/xx.xx.x
command to load the Mamba version that you want to use. If you don't specify a version, the default version (D) is loaded, which is Mamba/23.11.0-0.
...
Code Block |
---|
(tensorflow-2.12.1) username@lanta:~> conda deactivate username@lanta:~> |
Creating the environment in the user’s home
Create the environment
Use the conda create -n myenv
commands to create the environment with myenv name.
Code Block |
---|
username@lanta:~> conda create -n myenv Channels: - conda-forge Platform: linux-64 Collecting package metadata (current_repodata.json): done Solving environment: done ## Package Plan ## environment location: /your directory/envs/myenv Proceed ([y]/n)? y ... |
...
Code Block |
---|
username@lanta:~> conda create -n myenv python=3.9 Channels: - conda-forge Platform: linux-64 Collecting package metadata (current_repodata.json): done Solving environment: done ## Package Plan ## environment location: /your directory/envs/myenv added / updated specs: - python=3.9 The following packages will be downloaded: package | build ---------------------------|----------------- capython-certificates-20233.01.10 |9.19 h06a4308|h0755675_0_cpython 22.7 MB 120 KBconda-forge certifiwheel-20220.12.743.0 | py39h06a4308_0 pyhd8ed1ab_1 15057 KB conda-forge ------------------------------------------------------------ Total: 22.8 270MB KB The following NEW packages will be INSTALLED: _libgcc_mutex pkgsconda-forge/main/linux-64::_libgcc_mutex-0.1-mainconda_forge _openmp_mutex pkgsconda-forge/main/linux-64::_openmp_mutex-4.5.1-12_gnu bzip2 ca-certificates pkgs/mainconda-forge/linux-64::cabzip2-certificates-20231.010.108-h06a4308hd590300_05 certifica-certificates pkgs/main/conda-forge/linux-64::certifica-certificates-20222024.122.72-py39h06a4308hbcca054_0 ld_impl_linux-64 pkgsconda-forge/main/linux-64::ld_impl_linux-64-2.3840-h1181459h41732ed_10 libffi pkgsconda-forge/main/linux-64::libffi-3.4.2-h6a678d5h7f98852_65 libgcc-ng pkgsconda-forge/main/linux-64::libgcc-ng-1113.2.0-h1234567h807b86a_15 libgomp pkgs/mainconda-forge/linux-64::libgomp-1113.2.0-h1234567_1h807b86a_5 libnsl libstdcxx-ng pkgsconda-forge/main/linux-64::libstdcxx-nglibnsl-11.2.0.1-h1234567hd590300_10 ncurseslibsqlite pkgs/main/conda-forge/linux-64::ncurseslibsqlite-63.45.42-h6a678d5h2797004_0 openssllibuuid pkgsconda-forge/main/linux-64::openssllibuuid-12.38.1.1t-h7f8727eh0b41bf4_0 piplibxcrypt pkgs/main/conda-forge/linux-64::piplibxcrypt-224.34.136-py39h06a4308hd590300_01 pythonlibzlib pkgs/main/conda-forge/linux-64::pythonlibzlib-31.92.1613-h7a1cb2ahd590300_05 readlinencurses pkgsconda-forge/main/linux-64::readlinencurses-86.24.20240210-h5eee18bh59595ed_0 openssl setuptools pkgs/mainconda-forge/linux-64::setuptoolsopenssl-653.62.31-py39h06a4308_0hd590300_1 pip sqlite pkgs/main/linux-64conda-forge/noarch::sqlitepip-324.40.10-h5082296pyhd8ed1ab_0 tkpython pkgs/mainconda-forge/linux-64::tkpython-83.69.1219-h1ccaba5h0755675_0_cpython tzdatareadline pkgs/main/noarchconda-forge/linux-64::tzdatareadline-2022g8.2-h04d1e81h8228510_01 wheelsetuptools pkgs/main/linux-64::wheel-0.38.4-py39h06a4308conda-forge/noarch::setuptools-69.2.0-pyhd8ed1ab_0 xztk pkgsconda-forge/main/linux-64::xztk-58.26.1013-h5eee18bnoxft_h4845f30_1101 zlibtzdata pkgs/mainconda-forge/noarch::tzdata-2024a-h0c530f3_0 wheel conda-forge/noarch::wheel-0.43.0-pyhd8ed1ab_1 xz conda-forge/linux-64::zlibxz-15.2.136-h5eee18bh166bdaf_0 Proceed ([y]/n)? y ... |
...
Code Block |
---|
username@lanta:~> conda create -n myenv python=3.9 numpy=1.23.5 Channels: - conda-forge Platform: linux-64 Collecting package metadata (current_repodata.json): done Solving environment: done ## Package Plan ## environment location: /your directory/envs/myenv added / updated specs: - numpy=1.23.5 - python=3.9 The following packages will be downloaded: package | build ---------------------------|----------------- blas-1.0 | mkl 6 KB ca-certificates-2023.01.10 |--- h06a4308_libblas-3.9.0 120 KB certifi-2022.12.7|21_linux64_openblas 14 |KB conda-forge py39h06a4308_0 libcblas-3.9.0 150 KB intel-openmp-2021.4.0 |21_linux64_openblas h06a4308_3561 14 KB 4.2 MBconda-forge mkl-2021.4libgfortran-ng-13.2.0 | h69a702a_5 | h06a4308_640 23 KB 142.6 MBconda-forge mkl-service-2.4liblapack-3.9.0 | py39h7f8727e_0|21_linux64_openblas 5914 KB conda-forge mkl_fftnumpy-1.323.15 | py39hd3c417cpy39h3d75532_0 182 KB5.6 MB conda-forge mkl_randompython-13.29.219 | py39h51133e4|h0755675_0_cpython 22.7 MB 309 KBconda-forge numpypython_abi-1.23.53.9 | | py39h14f42284_0cp39 106 KB conda-forge numpywheel-base-10.23.543.0 | py39h31eccc5_0 pyhd8ed1ab_1 57 6.7 MBKB conda-forge ------------------------------------------------------------ Total: 28.4 MB The following NEW packages will be INSTALLED: _libgcc_mutex conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge _openmp_mutex conda-forge/linux-64::_openmp_mutex-4.5-2_gnu bzip2 Total: 154.3 MB The following NEW packages will be INSTALLED: _libgcc_mutex pkgs/main conda-forge/linux-64::bzip2-1.0.8-hd590300_5 ca-certificates conda-forge/linux-64::_libgcc_mutex-0.1-mainca-certificates-2024.2.2-hbcca054_0 ld_openmpimpl_mutexlinux-64 pkgs/main/conda-forge/linux-64::ld_openmpimpl_mutexlinux-64-52.140-1h41732ed_gnu0 blaslibblas pkgs/main/conda-forge/linux-64::blaslibblas-1.0-mkl3.9.0-21_linux64_openblas libcblas ca-certificates pkgs/mainconda-forge/linux-64::calibcblas-certificates-20233.019.100-h06a4308_021_linux64_openblas libffi certifi pkgs/mainconda-forge/linux-64::certifilibffi-20223.124.72-py39h06a4308h7f98852_05 intel-openmplibgcc-ng pkgsconda-forge/main/linux-64::intellibgcc-openmpng-202113.42.0-h06a4308h807b86a_35615 ld_impl_linux-64libgfortran-ng pkgs/mainconda-forge/linux-64::ld_impl_linux-64-libgfortran-ng-13.2.380-h1181459h69a702a_15 libffilibgfortran5 pkgs/main/conda-forge/linux-64::libffilibgfortran5-313.42.20-h6a678d5ha4646dd_65 libgomp libgcc-ng pkgs/mainconda-forge/linux-64::libgcclibgomp-ng-1113.2.0-h1234567h807b86a_15 libgomp liblapack pkgs/mainconda-forge/linux-64::libgompliblapack-113.29.0-h1234567_121_linux64_openblas libnsl libstdcxx-ng pkgsconda-forge/main/linux-64::libstdcxxlibnsl-ng-11.2.0.1-h1234567hd590300_10 mkllibopenblas pkgs/main/conda-forge/linux-64::mkllibopenblas-20210.43.026-h06a4308_640 mkl-servicepthreads_h413a1c8_0 libsqlite pkgsconda-forge/main/linux-64::mkllibsqlite-service-23.445.02-py39h7f8727eh2797004_0 mkl_fftlibstdcxx-ng pkgs/main/conda-forge/linux-64::mkl_fft-1.3.1-py39hd3c417c_0libstdcxx-ng-13.2.0-h7e041cc_5 libuuid mkl_random pkgs/mainconda-forge/linux-64::mkl_randomlibuuid-12.238.21-py39h51133e4h0b41bf4_0 ncurseslibxcrypt pkgs/mainconda-forge/linux-64::ncurseslibxcrypt-64.4.36-h6a678d5hd590300_01 numpylibzlib pkgs/mainconda-forge/linux-64::numpylibzlib-1.232.513-py39h14f4228_0hd590300_5 ncurses numpy-base pkgsconda-forge/main/linux-64::numpyncurses-base-16.234.520240210-py39h31eccc5h59595ed_0 numpy openssl pkgsconda-forge/main/linux-64::opensslnumpy-1.123.1t5-h7f8727epy39h3d75532_0 pipopenssl pkgs/mainconda-forge/linux-64::pipopenssl-223.32.1-py39h06a4308_0hd590300_1 pip python pkgs/main/linux-64conda-forge/noarch::pythonpip-324.9.160-h7a1cb2apyhd8ed1ab_0 readlinepython pkgsconda-forge/main/linux-64::readlinepython-83.9.219-h5eee18bh0755675_0_cpython setuptoolspython_abi pkgsconda-forge/main/linux-64::setuptoolspython_abi-653.6.39-py39h06a43084_0cp39 sixreadline pkgs/main/noarch::six-1.16.0-pyhd3eb1b0conda-forge/linux-64::readline-8.2-h8228510_1 sqlitesetuptools pkgs/main/linux-64::sqlite-3.40.1-h5082296conda-forge/noarch::setuptools-69.2.0-pyhd8ed1ab_0 tk pkgsconda-forge/main/linux-64::tk-8.6.1213-h1ccaba5noxft_h4845f30_0101 tzdata pkgs/mainconda-forge/noarch::tzdata-2022g2024a-h04d1e81h0c530f3_0 wheel pkgs/main/linux-64conda-forge/noarch::wheel-0.3843.40-py39h06a4308pyhd8ed1ab_01 xz pkgsconda-forge/main/linux-64::xz-5.2.10-h5eee18b_1 zlib pkgs/main/linux-64::zlib-1.2.136-h5eee18bh166bdaf_0 Proceed ([y]/n)? y ... |
Creating the environment in the project’s home
Specify a location for the environment
...
Code Block |
---|
username@lanta:~> conda create --prefix /your project directory/envs Channels: - conda-forge Platform: linux-64 Collecting package metadata (current_repodata.json): done Solving environment: done ## Package Plan ## environment location: /your project directory/envs Proceed ([y]/n)? y ... |
...
Code Block |
---|
username@lanta:~> conda create --prefix /your project directory/envs python=3.9 Channels: - conda-forge Platform: linux-64 Collecting package metadata (current_repodata.json): done Solving environment: done ## Package Plan ## environment location: /your project directory/envs added / updated specs: - python=3.9 The following packages will be downloaded: package | build ---------------------------|----------------- capython-certificates-20233.01.10 |9.19 h06a4308|h0755675_0_cpython 22.7 MB conda-forge wheel-0.43.0 120 KB certifi-2022.12.7 | | py39h06a4308pyhd8ed1ab_01 15057 KB conda-forge ------------------------------------------------------------ Total: 22.8 MB The following NEW packages will be INSTALLED: _libgcc_mutex conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge _openmp_mutex conda-forge/linux-64::_openmp_mutex-4.5-2_gnu bzip2 Total: 270 KB The following NEW packages will be INSTALLED: _libgcc_mutex pkgs/mainconda-forge/linux-64::bzip2-1.0.8-hd590300_5 ca-certificates conda-forge/linux-64::ca-certificates-2024.2.2-hbcca054_0 ld_impl_linux-64 conda-forge/linux-64::ld_libgccimpl_mutexlinux-64-02.1-main40-h41732ed_0 libffi _openmp_mutex pkgsconda-forge/main/linux-64::_openmp_mutex-5.1-1_gnulibffi-3.4.2-h7f98852_5 ca-certificateslibgcc-ng pkgsconda-forge/main/linux-64::calibgcc-certificatesng-202313.012.100-h06a4308h807b86a_05 certifilibgomp pkgsconda-forge/main/linux-64::certifilibgomp-2022.12.7-py39h06a4308_0 ld_impl_linux-64 pkgs/main13.2.0-h807b86a_5 libnsl conda-forge/linux-64::ld_impl_linux-64-2.38-h1181459_1libnsl-2.0.1-hd590300_0 libffilibsqlite pkgs/mainconda-forge/linux-64::libffilibsqlite-3.445.2-h6a678d5h2797004_60 libuuid libgcc-ng pkgsconda-forge/main/linux-64::libgcclibuuid-ng-112.238.01-h1234567h0b41bf4_10 libgomplibxcrypt pkgs/mainconda-forge/linux-64::libgomplibxcrypt-114.24.036-h1234567hd590300_1 libzlib libstdcxx-ng pkgsconda-forge/main/linux-64::libstdcxxlibzlib-ng-111.2.013-h1234567hd590300_15 ncurses pkgsconda-forge/main/linux-64::ncurses-6.4.20240210-h6a678d5h59595ed_0 openssl pkgsconda-forge/main/linux-64::openssl-13.2.1.1t-h7f8727ehd590300_01 pip pkgs/main/linux-64conda-forge/noarch::pip-2224.3.10-py39h06a4308pyhd8ed1ab_0 python pkgs/mainconda-forge/linux-64::python-3.9.1619-h7a1cb2ah0755675_0_cpython readline pkgs/mainconda-forge/linux-64::readline-8.2-h5eee18bh8228510_01 setuptools pkgs/main/linux-64::setuptools-65.6.3-py39h06a4308_0 sqlite pkgs/main/linux-64::sqlite-3.40.1-h5082296conda-forge/noarch::setuptools-69.2.0-pyhd8ed1ab_0 tk pkgs/mainconda-forge/linux-64::tk-8.6.1213-h1ccaba5noxft_h4845f30_0101 tzdata pkgsconda-forge/main/noarch::tzdata-2022g-h04d1e81_0 wheel pkgs/main/linux-64::wheel-0.38.4-py39h06a43082024a-h0c530f3_0 xzwheel pkgs/main/linux-64::xz-5.2.10-h5eee18b_1 zlibconda-forge/noarch::wheel-0.43.0-pyhd8ed1ab_1 xz pkgs/mainconda-forge/linux-64::zlibxz-15.2.136-h5eee18bh166bdaf_0 Proceed ([y]/n)? y ... |
...
Code Block |
---|
username@lanta:~> conda activate /your project directory/envs (/your project directory/envs) username@lanta:~> |
Creating the environment from an requirements.yml file
A simple requirements.yml file
...
Code Block |
---|
username@lanta:~> conda env create -f requirements.yml Channels: - conda-forge Platform: linux-64 Collecting package metadata (repodata.json): done Solving environment: done Downloading and Extracting Packages Preparing transaction: done Verifying transaction: done Executing transaction: done |
...
Code Block |
---|
username@lanta:~> conda env create -f requirements.yml --prefix /your project directory/envs
Channels:
- conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: done |
Removing the environment
Remove the environment in the user’s home
...
Code Block |
---|
username@lanta:~> rm -rf /your project directory/envs |
...
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...