Spaces:
Running
Running
Commit
·
53b0192
1
Parent(s):
1867359
New Dockerfile
Browse files- Dockerfile +3 -11
Dockerfile
CHANGED
|
@@ -12,21 +12,13 @@ USER user
|
|
| 12 |
ENV HOME=/home/user \
|
| 13 |
PATH=/home/user/.local/bin:$PATH
|
| 14 |
|
| 15 |
-
# Set the working directory to the user's home directory
|
| 16 |
-
WORKDIR $HOME/app
|
| 17 |
-
|
| 18 |
-
# Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
|
| 19 |
-
|
| 20 |
-
RUN pip install --no-cache-dir --upgrade pip
|
| 21 |
-
|
| 22 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 23 |
-
COPY --chown=user . $HOME/app
|
| 24 |
-
|
| 25 |
COPY --chown=user packages.txt .
|
| 26 |
|
|
|
|
|
|
|
| 27 |
RUN xargs -a packages.txt apt-get --yes install
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 32 |
|
|
|
|
| 12 |
ENV HOME=/home/user \
|
| 13 |
PATH=/home/user/.local/bin:$PATH
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
COPY --chown=user packages.txt .
|
| 16 |
|
| 17 |
+
COPY --chown=user requirements.txt .
|
| 18 |
+
|
| 19 |
RUN xargs -a packages.txt apt-get --yes install
|
| 20 |
|
| 21 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 22 |
|
| 23 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 24 |
|