@@ -15,16 +15,20 @@ RUN apt-get update && \
15
15
apt-get clean && \
16
16
rm -rf /var/lib/apt/lists/*
17
17
18
- # Create conda environment
18
+ # Create conda environment and install jupyterlab
19
19
RUN conda env create -f /tmp/environment.yml && \
20
+ conda install -n uwgda-image-living -c conda-forge jupyterlab && \
20
21
conda clean -afy
21
22
22
- # Add jupyterlab to environment
23
- RUN conda install -n uwgda-image-living -c conda-forge jupyterlab && \
24
- conda clean -afy
23
+ # Make RUN commands use the new conda environment
24
+ SHELL ["conda" , "run" , "-n" , "uwgda-image-living" , "/bin/bash" , "-c" ]
25
+
26
+ # Set up conda env activation
27
+ RUN echo "conda activate uwgda-image-living" >> ~/.bashrc
25
28
26
- # Add conda environment to PATH
27
- ENV PATH /opt/conda/envs/uw-gda-living/bin:$PATH
29
+ # Add conda environment to PATH and set CONDA_DEFAULT_ENV
30
+ ENV PATH /opt/conda/envs/uwgda-image-living/bin:$PATH
31
+ ENV CONDA_DEFAULT_ENV uwgda-image-living
28
32
29
33
# Set up work directory and permissions
30
34
WORKDIR /home/jovyan
@@ -36,5 +40,6 @@ USER jovyan
36
40
# Expose Jupyter port
37
41
EXPOSE 8888
38
42
39
- # Start JupyterLab
43
+ # Start JupyterLab using conda run to ensure we're in the right environment
44
+ ENTRYPOINT ["conda" , "run" , "-n" , "uwgda-image-living" ]
40
45
CMD ["jupyter" , "lab" , "--ip" , "0.0.0.0" , "--no-browser" , "--ServerApp.token=''" ]
0 commit comments