Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +15 -6
Dockerfile
CHANGED
|
@@ -1,11 +1,20 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# Set working directory
|
| 4 |
+
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Copy requirements and install dependencies
|
| 7 |
+
COPY requirements.txt .
|
| 8 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 9 |
|
| 10 |
+
# Copy application code
|
| 11 |
+
COPY app.py .
|
| 12 |
|
| 13 |
+
# Expose port for Hugging Face Spaces
|
| 14 |
+
EXPOSE 7860
|
| 15 |
|
| 16 |
+
# Set environment variable for the port
|
| 17 |
+
ENV PORT=7860
|
| 18 |
+
|
| 19 |
+
# Run the MCP server
|
| 20 |
+
CMD ["python", "app.py"]
|