prakashkumarsingh commited on
Commit
f7cd8b1
·
verified ·
1 Parent(s): f2604df

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -18
Dockerfile CHANGED
@@ -1,27 +1,12 @@
1
- FROM python:3.10-slim
2
 
3
- # Install system packages required for pygame + headless display
4
- RUN apt-get update && apt-get install -y \
5
- xvfb \
6
- python3-tk \
7
- libglib2.0-0 \
8
- libsm6 \
9
- libxrender1 \
10
- libxext6 \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- # Set working directory
14
  WORKDIR /app
15
 
16
- # Install Python dependencies
17
  COPY requirements.txt .
18
- RUN pip install -r requirements.txt
19
 
20
- # Copy source code
21
  COPY app.py .
22
 
23
- # Expose Hugging Face expected port
24
  EXPOSE 7860
25
 
26
- # Launch Gradio + pygame app using virtual display
27
- CMD xvfb-run -a python app.py.
 
1
+ FROM python:3.9-slim
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY app.py .
9
 
 
10
  EXPOSE 7860
11
 
12
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]