Spaces:
Running
Running
Yaron Koresh
commited on
Update Dockerfile
Browse files- Dockerfile +6 -12
Dockerfile
CHANGED
@@ -1,16 +1,8 @@
|
|
1 |
FROM nvidia/cuda
|
2 |
|
3 |
-
WORKDIR /code
|
4 |
-
COPY ./env.yml /code/env.yml
|
5 |
-
|
6 |
-
# Create the environment using the environment.yml file
|
7 |
-
RUN conda env create -f /code/env.yml
|
8 |
-
|
9 |
-
# Set up a new user named "user" with user ID 1000
|
10 |
RUN useradd -m -u 1000 user
|
11 |
-
# Switch to the "user" user
|
12 |
USER user
|
13 |
-
|
14 |
ENV HOME=/home/user \
|
15 |
PYTHONUNBUFFERED=1 \
|
16 |
PYTHONPATH=$HOME/app/cpython \
|
@@ -20,10 +12,12 @@ ENV HOME=/home/user \
|
|
20 |
GRADIO_THEME=huggingface \
|
21 |
SYSTEM=spaces
|
22 |
|
23 |
-
# Set the working directory to the user's home directory
|
24 |
WORKDIR $HOME/app
|
25 |
-
|
26 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
27 |
COPY --chown=user . $HOME/app
|
28 |
|
|
|
|
|
|
|
|
|
|
|
29 |
CMD ["./start.sh"]
|
|
|
1 |
FROM nvidia/cuda
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
RUN useradd -m -u 1000 user
|
|
|
4 |
USER user
|
5 |
+
|
6 |
ENV HOME=/home/user \
|
7 |
PYTHONUNBUFFERED=1 \
|
8 |
PYTHONPATH=$HOME/app/cpython \
|
|
|
12 |
GRADIO_THEME=huggingface \
|
13 |
SYSTEM=spaces
|
14 |
|
|
|
15 |
WORKDIR $HOME/app
|
|
|
|
|
16 |
COPY --chown=user . $HOME/app
|
17 |
|
18 |
+
RUN curl -sL "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" > "Miniconda3.sh"
|
19 |
+
CMD ["Miniconda3.sh", "-b"]
|
20 |
+
RUN source /home/miniconda3/bin/activate
|
21 |
+
RUN conda env create -f /code/env.yml
|
22 |
+
|
23 |
CMD ["./start.sh"]
|