Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -15
Dockerfile
CHANGED
@@ -1,23 +1,13 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
|
4 |
-
RUN apt-get update && apt-get install -y \
|
5 |
-
build-essential \
|
6 |
-
libgl1-mesa-glx \
|
7 |
-
&& rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
-
# Set the working directory
|
10 |
WORKDIR /app
|
11 |
|
12 |
-
|
13 |
-
COPY requirements.txt .
|
14 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
-
|
17 |
-
COPY . .
|
18 |
|
19 |
-
|
20 |
-
EXPOSE 7860
|
21 |
|
22 |
-
|
23 |
-
CMD ["python", "app.py"]
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
RUN useradd -m -u 1000 user
|
|
|
|
|
|
|
|
|
4 |
|
|
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
|
|
|
|
8 |
|
9 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
10 |
|
11 |
+
COPY --chown=user . /app
|
|
|
12 |
|
13 |
+
CMD ["python", "app.py"]
|
|