codex-traces / Dockerfile
Mike0021's picture
Add Docker startup diagnostics
107df46 verified
Raw
History Blame Contribute Delete
618 Bytes
FROM python:3.11-slim
ENV HF_HOME=/tmp/.cache/huggingface \
HF_MODULES_CACHE=/tmp/hf_modules \
MPLCONFIGDIR=/tmp/matplotlib \
GRADIO_ANALYTICS_ENABLED=False \
GRADIO_SSR_MODE=false \
PYTHONUNBUFFERED=1
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
COPY app.py .
RUN python -m py_compile app.py
EXPOSE 7860
CMD ["/bin/sh", "-c", "echo codex-traces docker cmd start >&2; python -u app.py"]