Final_Demo_Ver1 / Dockerfile
wanwanlin0521's picture
Create Dockerfile
6f39d31 verified
Raw
History Blame Contribute Delete
626 Bytes
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Install system dependencies required for WeasyPrint
RUN apt-get update && apt-get install -y \
libpango-1.0-0 \
libpangoft2-1.0-0 \
libcairo2 \
libgdk-pixbuf-2.0-0 \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements.txt and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Expose the port Gradio will run on
EXPOSE 7860
# Command to run the application
CMD ["python", "app.py"]