File size: 614 Bytes
ca5da9f
 
 
 
 
 
7c4a67e
ca5da9f
7c4a67e
ca5da9f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 1️⃣ Use an official slim Python image
FROM python:3.9-slim

# 2️⃣ Set working directory
WORKDIR /app

# 3️⃣ Install required system dependencies (fixes libGL and libgthread errors)
RUN apt-get update && \
    apt-get install -y libgl1-mesa-glx libglib2.0-0 && \
    rm -rf /var/lib/apt/lists/*

# 4️⃣ Copy requirements
COPY requirements.txt .

# 5️⃣ Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# 6️⃣ Copy all files from the root of your project
COPY . .

# 7️⃣ Expose the port
EXPOSE 7860

# 8️⃣ Command to run the app
CMD ["python", "app.py"]