Tas01's picture
Upload Dockerfile
5126e31 verified
raw
history blame
510 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install minimal system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Copy and install requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
COPY app.py .
# Set environment variables for Gradio
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT=7860
# Expose port
EXPOSE 7860
# Run the app
CMD ["python", "app.py"]