bug-explainer-ml / Dockerfile
Sushwetabm
updated requirements.txt
08937bf
raw
history blame contribute delete
557 Bytes
FROM python:3.10-slim
WORKDIR /app
ENV TRANSFORMERS_CACHE=/app/model_cache \
HF_HOME=/app/model_cache \
TORCH_HOME=/app/model_cache \
TOKENIZERS_PARALLELISM=false \
OMP_NUM_THREADS=4
RUN apt-get update && apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
COPY . .
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Optional: preload model
RUN python setup.py
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "120", "--log-level", "info"]