adorable-hydrogen-22236
02/08/2023, 1:36 AMFROM continuumio/miniconda3
RUN mkdir dockerfiles
COPY dockerfiles ./dockerfiles
WORKDIR /dockerfiles
RUN conda create -n base_env python=3.8
RUN /bin/bash -c "source activate base_env && pip install -r dependency.txt"
RUN echo "conda activate base_env" >> ~/.bashrc
ENV PATH /opt/conda/envs/env/bin:$PATHadorable-hydrogen-22236
02/08/2023, 1:37 AMancient-application-36103
02/08/2023, 1:40 AMadorable-hydrogen-22236
02/08/2023, 1:40 AMancient-application-36103
02/08/2023, 1:41 AMwhich python inside the container - does it point to the same conda environment?late-telephone-2729
02/08/2023, 1:43 AM/opt/conda/envs/base_env/bin/python is what we see. Looks like the base_env is the activated onelate-telephone-2729
02/08/2023, 1:43 AMlate-telephone-2729
02/08/2023, 1:45 AM@batch(cpu=1, image=COMMON_CONDA_BASE_IMAGE)ancient-application-36103
02/08/2023, 1:47 AMwhich python within your step code before the call to import numpy, what do you see there?adorable-hydrogen-22236
02/08/2023, 1:54 AM/opt/conda/bin/python
@ancient-application-36103 here is what I got, it looks the activated conda env is not used in actual run for some reason, how can I activate my conda env?ancient-application-36103
02/08/2023, 1:55 AMRUN conda activate base_env
should do the trickadorable-hydrogen-22236
02/08/2023, 1:57 AMconda activate base_env in my dockerfile, it should be automatically activatedadorable-hydrogen-22236
02/08/2023, 1:57 AMancient-application-36103
02/08/2023, 1:59 AMadorable-hydrogen-22236
02/08/2023, 2:01 AMancient-application-36103
02/08/2023, 2:01 AMadorable-hydrogen-22236
02/08/2023, 2:03 AM