Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official lightweight Python image.
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Set environment variables for better performance
|
5 |
+
ENV PYTHONUNBUFFERED=1 \
|
6 |
+
PYTHONDONTWRITEBYTECODE=1
|
7 |
+
|
8 |
+
# Set working directory
|
9 |
+
WORKDIR /app
|
10 |
+
|
11 |
+
# Copy requirements.txt and install dependencies
|
12 |
+
COPY requirements.txt .
|
13 |
+
RUN pip install --upgrade pip && \
|
14 |
+
pip install -r requirements.txt
|
15 |
+
|
16 |
+
# Copy the entire project
|
17 |
+
COPY . .
|
18 |
+
|
19 |
+
# Expose port 7860 (Gradio default)
|
20 |
+
EXPOSE 7860
|
21 |
+
|
22 |
+
# Start the app
|
23 |
+
CMD ["python", "app.py"]
|