Skip to content

Conda env configuration problem in sysbio-training/masters-2020/epigenetics/Dockerfile #1

@iromeo

Description

@iromeo

Due 'PATH="/opt/conda/envs/bio/bin:${PATH}"' >> ~/.profile & in the line

# Fix: R shell uses env variables from ~/profile
RUN echo 'PATH="/opt/conda/bin:${PATH}"' >> ~/.profile && \
	echo 'PATH="/opt/conda/envs/bio/bin:${PATH}"' >> ~/.profile && \
	echo 'LD_LIBRARY_PATH="/opt/conda/lib:${LD_LIBRARY_PATH}"' >> ~/.profile && \
	echo "export LC_ALL=C.UTF-8" >> ~/.profile && \
    echo "export LANG=C.UTF-8" >> ~/.profile

users get bio conda env bin folder even if the other environment is activated, this leads broken environments except bio:

(base) student@ad992674a9d9:~$ echo $PATH
/opt/conda/envs/bio/bin:/opt/conda/bin:/opt/conda/bin:/opt/conda/condabin:/opt/conda/envs/bio/bin:/opt/conda/bin:/opt/conda/envs/bio/bin:/opt/conda/bin:/opt/conda/envs/bio/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/rstudio-server/bin/postback:/usr/lib/rstudio-server/bin/postback:/usr/lib/rstudio-server/bin/postback:/opt/conda/envs/bio/bin
(base) student@ad992674a9d9:~$ conda activate meth
(meth) student@ad992674a9d9:~$ echo $PATH
/opt/conda/envs/bio/bin:/home/student/.conda/envs/meth/bin:/opt/conda/bin:/opt/conda/condabin:/opt/conda/envs/bio/bin:/opt/conda/bin:/opt/conda/envs/bio/bin:/opt/conda/bin:/opt/conda/envs/bio/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/rstudio-server/bin/postback:/usr/lib/rstudio-server/bin/postback:/usr/lib/rstudio-server/bin/postback:/opt/conda/envs/bio/bin
(meth) student@ad992674a9d9:~$ which multiqc
/opt/conda/envs/bio/bin/multiqc
(meth) student@ad992674a9d9:~$ cat /mnt/meth/conda_envs/meth.yaml | grep 'multiqc'
  - multiqc=1.9
(meth) student@ad992674a9d9:~$ multiqc --version^C
(meth) student@ad992674a9d9:~$ cat /mnt/meth/conda_envs/meth.yaml | grep 'python'
  - python=3.7
  - ipython=7.19.0
(meth) student@ad992674a9d9:~$ which python
/opt/conda/envs/bio/bin/python
(meth) student@ad992674a9d9:~$ python --version
Python 2.7.17 :: Anaconda, Inc.
(meth) student@ad992674a9d9:~$ multiqc --version
/opt/conda/envs/bio/lib/python2.7/site-packages/multiqc-1.0.dev0-py2.7.egg/multiqc/utils/config.py:44: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  configs = yaml.load(f)
/opt/conda/envs/bio/lib/python2.7/site-packages/multiqc-1.0.dev0-py2.7.egg/multiqc/utils/config.py:50: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  sp = yaml.load(f)
multiqc, version 1.0.dev0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions