Spaces:
Sleeping
Sleeping
update docker
Browse files- Dockerfile +13 -31
Dockerfile
CHANGED
|
@@ -1,36 +1,18 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
# # Copy and install dependencies
|
| 8 |
-
# COPY requirements.txt .
|
| 9 |
-
# RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
-
|
| 11 |
-
# # Copy your app code
|
| 12 |
-
# COPY . .
|
| 13 |
-
|
| 14 |
-
# # Expose the port the app runs on
|
| 15 |
-
# EXPOSE 7860
|
| 16 |
-
|
| 17 |
-
# # Run your app
|
| 18 |
-
# CMD ["python", "app.py"]
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
| 22 |
-
# you will also find guides on how best to write your Dockerfile
|
| 23 |
-
|
| 24 |
-
FROM python:3.9
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
|
|
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
| 34 |
|
| 35 |
-
|
| 36 |
-
CMD ["
|
|
|
|
| 1 |
+
# Use a lightweight Python base
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Set working directory in container
|
| 5 |
+
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
# Copy and install dependencies
|
| 8 |
+
COPY requirements.txt .
|
| 9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
+
# Copy your app code
|
| 12 |
+
COPY . .
|
| 13 |
|
| 14 |
+
# Expose the port the app runs on
|
| 15 |
+
EXPOSE 7860
|
| 16 |
|
| 17 |
+
# Run your app
|
| 18 |
+
CMD ["python", "app.py"]
|