File size: 783 Bytes
0947551 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # RunNow Gradio Frontend Dockerfile
# ---------------------------------
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Set workdir
WORKDIR /app
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements (if exists) and install Python dependencies
COPY requirements.txt ./
RUN pip install --upgrade pip && \
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Copy the rest of the code
COPY . .
# Expose Gradio default port
EXPOSE 7860
# Set environment variables
ENV GRADIO_SERVER_NAME="0.0.0.0"
# Entrypoint
CMD ["python", "app.py"]
|