Spaces:
Sleeping
Sleeping
ShobhitKori
commited on
Commit
·
76c8bd2
1
Parent(s):
dfe177d
Updated Dockerfile
Browse files- Dockerfile +7 -10
Dockerfile
CHANGED
|
@@ -2,17 +2,14 @@
|
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set workdir
|
| 5 |
-
WORKDIR /app
|
| 6 |
-
|
| 7 |
-
# Install dependencies
|
| 8 |
-
COPY requirements.txt .
|
| 9 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 10 |
-
|
| 11 |
-
# Copy app files
|
| 12 |
-
COPY . .
|
| 13 |
|
|
|
|
|
|
|
| 14 |
# Expose the port Hugging Face expects
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set workdir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
RUN useradd -m -u 1000 user
|
| 7 |
+
WORKDIR /app
|
| 8 |
# Expose the port Hugging Face expects
|
| 9 |
EXPOSE 7860
|
| 10 |
|
| 11 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 12 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 13 |
+
|
| 14 |
+
COPY --chown=user . /app
|
| 15 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|