AI_Safety_Demo5 / Dockerfile
neerajkalyank's picture
Update Dockerfile
2b4fa6b verified
raw
history blame contribute delete
662 Bytes
FROM python:3.10-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
libopenblas-dev \
liblapack-dev \
libjpeg-dev \
libpng-dev \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first to leverage Docker caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Ensure static/output directory exists
RUN mkdir -p static/output
# Expose port for Gradio
EXPOSE 7860
# Command to run the application
CMD ["python", "app.py"]