Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -15
Dockerfile
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
# Set
|
| 4 |
-
|
| 5 |
-
ENV PYTHONUNBUFFERED=1
|
| 6 |
-
|
| 7 |
-
# Install dependencies
|
| 8 |
-
RUN apt-get update && apt-get install -y git
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
|
| 12 |
-
RUN pip install fastapi uvicorn transformers torch
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
|
| 17 |
-
# Copy your
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
-
# Expose port
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
CMD ["
|
|
|
|
| 1 |
+
# Use an official Python runtime as a parent image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Set working directory in container
|
| 5 |
+
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
# Copy requirements if you have them
|
| 8 |
+
COPY requirements.txt ./
|
|
|
|
| 9 |
|
| 10 |
+
# Install dependencies
|
| 11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Copy the rest of your code
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
+
# Expose port (default for Gradio)
|
| 17 |
EXPOSE 7860
|
| 18 |
|
| 19 |
+
# Command to run your app
|
| 20 |
+
CMD ["python", "app.py"]
|