prakashkumarsingh commited on
Commit
5c7e39e
·
verified ·
1 Parent(s): 8a76ade

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM python:3.10-slim
2
 
3
- # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
  xvfb \
6
  python3-tk \
@@ -10,15 +10,18 @@ RUN apt-get update && apt-get install -y \
10
  libxext6 \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Set up working directory
14
  WORKDIR /app
15
 
16
  # Install Python dependencies
17
  COPY requirements.txt .
18
  RUN pip install -r requirements.txt
19
 
20
- # Copy app code
21
  COPY app.py .
22
 
23
- # Run with Xvfb to support pygame
24
- CMD xvfb-run -a python app.py
 
 
 
 
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 \
 
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.