![]() ![]() How can I make it so when I run my docker image to build a container it automatically activates test_env regardless of the commands given? (base) jespinozlt2-osx:docker jespinoz$ docker run -it test bashĢ. When I run the container, it does not activate the test_env environment automatically. Here is my command to build the docker image: docker build -build-arg ENV_NAME=test_env -t test -f Dockerfile-test. You can then install additional packages by following. opt/conda/bin/conda config -add channels conda-forge & \ Miniconda is a minimalist version of Anaconda and includes a basic Python and the Conda package manager. opt/conda/bin/conda config -add channels bioconda & \ opt/conda/bin/conda config -add channels jolespin & \ Here is my Dockerfile: FROM continuumio/miniconda3 IPython 6.0 stopped support for Python 2, so installing IPython on Python 2 will give you an older version (5.x series). A docker container that will be interactive if no arguments are given but will automatically be in the conda environment.įor simplicity, I've created a docker container that installs seqkit through conda. Or using conda, create a Python 2 environment: conda create-n ipykernelpy2 python 2 ipykernel source activate ipykernelpy2 On Windows, remove the word source python-m ipykernel install-user. ![]() A docker container that can accept arguments for executables in the conda environment (e.g., docker run "seqkit -h".A docker container that automatically loads the conda environment.My main goal is to end up with the following: A better flow will depend on your need.I'm working on dockerizing a conda environment so I've created a toy example. This will install on activated envĪt the end of the day, conda is there to help you. Python -m pip install -r requirements.txtĪt any point, we can add packages in conda environment with # this will install requests to ml_api env. I will do: conda create -name ml_api python=3.7 -c conda-forge scikit-learn pandas For example, if I have a project with requirements.txt to be installed with pip but would like it to have pandas and scikit-learn from conda-forge. In fact, we often use a mix here and there. create an environment, activate, install packagesĬonda install package_name another_packageĬonda create -n env_name python=3.8 package_name another_packageīoth methods are correct.There are multiple ways to create and install packages using conda. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |