Spaces:
Sleeping
Sleeping
Commit
·
38ea86b
1
Parent(s):
a2de325
try again
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
@@ -13,8 +13,6 @@ WORKDIR /code
|
|
13 |
|
14 |
COPY ./requirements.txt /code/requirements.txt
|
15 |
|
16 |
-
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
17 |
-
|
18 |
# Set up a new user named "user" with user ID 1000
|
19 |
RUN useradd -m -u 1000 user
|
20 |
|
@@ -25,21 +23,23 @@ USER user
|
|
25 |
ENV HOME=/home/user \
|
26 |
PATH=/home/user/.local/bin:$PATH
|
27 |
|
|
|
|
|
|
|
28 |
# Activate miniconda
|
29 |
RUN cp /root/.bashrc /home/user/.bashrc
|
30 |
|
31 |
# Set the working directory to the user's home directory
|
32 |
WORKDIR $HOME/app
|
33 |
|
34 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
35 |
-
COPY --chown=user . $HOME/app
|
36 |
-
|
37 |
-
# Disable buffering to allow logging of standard output.
|
38 |
-
ENV PYTHONUNBUFFERED=1
|
39 |
-
|
40 |
# Needed to include .bashrc for conda activation
|
41 |
SHELL ["/bin/bash", "-i", "-c"]
|
42 |
|
|
|
|
|
|
|
|
|
|
|
43 |
RUN pip list
|
44 |
|
45 |
CMD python main.py
|
|
|
13 |
|
14 |
COPY ./requirements.txt /code/requirements.txt
|
15 |
|
|
|
|
|
16 |
# Set up a new user named "user" with user ID 1000
|
17 |
RUN useradd -m -u 1000 user
|
18 |
|
|
|
23 |
ENV HOME=/home/user \
|
24 |
PATH=/home/user/.local/bin:$PATH
|
25 |
|
26 |
+
# Disable buffering to allow logging of standard output.
|
27 |
+
ENV PYTHONUNBUFFERED=1
|
28 |
+
|
29 |
# Activate miniconda
|
30 |
RUN cp /root/.bashrc /home/user/.bashrc
|
31 |
|
32 |
# Set the working directory to the user's home directory
|
33 |
WORKDIR $HOME/app
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
# Needed to include .bashrc for conda activation
|
36 |
SHELL ["/bin/bash", "-i", "-c"]
|
37 |
|
38 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
39 |
+
|
40 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
41 |
+
COPY --chown=user . $HOME/app
|
42 |
+
|
43 |
RUN pip list
|
44 |
|
45 |
CMD python main.py
|