Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
-
#
|
| 4 |
RUN useradd -m -u 1000 user
|
| 5 |
USER user
|
| 6 |
ENV HOME=/home/user \
|
|
@@ -10,8 +10,10 @@ WORKDIR $HOME/app
|
|
| 10 |
|
| 11 |
COPY --chown=user . $HOME/app
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
RUN pip install --no-cache-dir --upgrade pip
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
|
| 17 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
+
# 1. Setup User (Hugging Face Security Requirement)
|
| 4 |
RUN useradd -m -u 1000 user
|
| 5 |
USER user
|
| 6 |
ENV HOME=/home/user \
|
|
|
|
| 10 |
|
| 11 |
COPY --chown=user . $HOME/app
|
| 12 |
|
| 13 |
+
# 2. Upgrade pip to ensure it picks the correct "Manylinux" wheel (fixes the musl error)
|
| 14 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 15 |
+
|
| 16 |
+
# 3. Install dependencies from requirements.txt
|
| 17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
CMD ["python", "app.py"]
|