arithescientist's picture
Upload Dockerfile
8cda91a verified
raw
history blame contribute delete
641 Bytes
# syntax=docker/dockerfile:1
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
# Minimal system deps (wheels provide BLAS/LAPACK)
RUN apt-get update && apt-get install -y --no-install-recommends git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt
COPY . .
# Expose default Gradio port; HF Spaces will set $PORT
EXPOSE 7860
# The Space sets OPENAI_API_KEY secret; app.py reads from env via dotenv as well
ENV GRADIO_SERVER_NAME=0.0.0.0
CMD ["python", "app.py"]