Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -13
Dockerfile
CHANGED
@@ -1,20 +1,17 @@
|
|
1 |
-
|
2 |
-
FROM continuumio/miniconda3:4.12.0
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
-
COPY ./environment.yml /code/environment.yml
|
10 |
|
11 |
-
#
|
12 |
-
|
13 |
-
|
14 |
-
conda clean --all --yes
|
15 |
|
16 |
-
#
|
17 |
-
ENV PATH
|
18 |
|
19 |
# Set up a new user named "user" with user ID 1000
|
20 |
RUN useradd -m -u 1000 user
|
|
|
1 |
+
FROM continuumio/miniconda3:latest
|
|
|
2 |
|
3 |
+
# Copy the environment YAML file into the container
|
4 |
+
COPY environment.yml /app/environment.yml
|
5 |
|
6 |
+
# Install dependencies from the YAML file
|
7 |
+
RUN conda env create -f /app/environment.yml && conda clean -afy
|
|
|
8 |
|
9 |
+
# Activate the environment by default
|
10 |
+
SHELL ["/bin/bash", "-c"]
|
11 |
+
RUN echo "conda activate cloudspace" >> ~/.bashrc
|
|
|
12 |
|
13 |
+
# Set the default shell to use the environment
|
14 |
+
ENV PATH /opt/conda/envs/cloudspace/bin:$PATH
|
15 |
|
16 |
# Set up a new user named "user" with user ID 1000
|
17 |
RUN useradd -m -u 1000 user
|