men_d / Dockerfile
JAYASREESS's picture
Upload 8 files
d77c194 verified
raw
history blame contribute delete
656 Bytes
# Use an official Python slim image as a parent image for a smaller size
FROM python:3.12-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file first to leverage Docker's layer caching
COPY requirements.txt .
# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of your application's code, including the trained models
# The .dockerignore file will ensure unnecessary files are excluded
COPY . .
# Expose the port that Gradio runs on
EXPOSE 7860
# The command to run when the container starts
# This will launch your Gradio application
CMD ["python", "app.py"]