ministerchief commited on
Commit
f66152c
·
verified ·
1 Parent(s): 4d112a1

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM python:3.10-slim
3
+
4
+ # Prevent interactive prompts
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install system dependencies for Tkinter + virtual display
8
+ RUN apt-get update && apt-get install -y \
9
+ python3-tk \
10
+ xvfb \
11
+ xauth \
12
+ x11-apps \
13
+ libx11-6 \
14
+ libgtk-3-0 \
15
+ && apt-get clean
16
+
17
+ # Set working directory
18
+ WORKDIR /app
19
+
20
+ # Copy project files
21
+ COPY . /app
22
+
23
+ # Install Python dependencies (if any)
24
+ RUN pip install --no-cache-dir -r requirements.txt || true
25
+
26
+ # Expose port (required for Hugging Face Spaces)
27
+ EXPOSE 7860
28
+
29
+ # Start app using virtual display (Xvfb)
30
+ CMD ["bash", "-c", "Xvfb :99 -screen 0 1024x768x16 & export DISPLAY=:99 && python app.py"]