wanwanlin0521 commited on
Commit
6f39d31
·
verified ·
1 Parent(s): 4421926

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.11-slim
3
+
4
+ # Install system dependencies required for WeasyPrint
5
+ RUN apt-get update && apt-get install -y \
6
+ libpango-1.0-0 \
7
+ libpangoft2-1.0-0 \
8
+ libcairo2 \
9
+ libgdk-pixbuf-2.0-0 \
10
+ libffi-dev \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Set working directory
14
+ WORKDIR /app
15
+
16
+ # Copy requirements.txt and install Python dependencies
17
+ COPY requirements.txt .
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy the application code
21
+ COPY . .
22
+
23
+ # Expose the port Gradio will run on
24
+ EXPOSE 7860
25
+
26
+ # Command to run the application
27
+ CMD ["python", "app.py"]