PD03 commited on
Commit
2475627
·
verified ·
1 Parent(s): db17f98

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -6
Dockerfile CHANGED
@@ -1,11 +1,20 @@
1
- FROM python:3.10
2
 
3
- WORKDIR /code
 
4
 
5
- COPY requirements.txt /code/requirements.txt
 
 
6
 
7
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
8
 
9
- COPY . /code
 
10
 
11
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
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"]