Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +13 -1
Dockerfile
CHANGED
@@ -1,6 +1,18 @@
|
|
1 |
# Use the official Python 3.10.4 image
|
2 |
FROM python:3.10.4
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
# Copy the current directory contents into the container at .
|
5 |
COPY . .
|
6 |
|
@@ -9,7 +21,7 @@ RUN apt-get update \
|
|
9 |
&& apt-get -y install ffmpeg
|
10 |
|
11 |
# Change to backend as working directory
|
12 |
-
WORKDIR backend/
|
13 |
|
14 |
# Install requirements.txt
|
15 |
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
|
|
1 |
# Use the official Python 3.10.4 image
|
2 |
FROM python:3.10.4
|
3 |
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
USER user
|
6 |
+
ENV HOME=/home/user \
|
7 |
+
PATH=/home/user/.local/bin:$PATH
|
8 |
+
|
9 |
+
COPY --chown=user ./backend $HOME/backend
|
10 |
+
|
11 |
+
# Change to backend as working directory
|
12 |
+
WORKDIR $HOME/backend
|
13 |
+
|
14 |
+
RUN mkdir $HOME/.cache
|
15 |
+
|
16 |
# Copy the current directory contents into the container at .
|
17 |
COPY . .
|
18 |
|
|
|
21 |
&& apt-get -y install ffmpeg
|
22 |
|
23 |
# Change to backend as working directory
|
24 |
+
# WORKDIR backend/
|
25 |
|
26 |
# Install requirements.txt
|
27 |
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|