AgroChat / Dockerfile
mutoni1923's picture
Deploy AgroChat without large model weights
ee140b6
Raw History Blame Contribute Delete
710 Bytes
FROM python:3.11-slim-bookworm
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TRANSFORMERS_CACHE=/tmp/hf-cache \
SENTENCE_TRANSFORMERS_HOME=/tmp/st-cache \
PORT=7860
WORKDIR /app
## RUN apt-get update && apt-get install -y --no-install-recommends \
##RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
##ca-certificates \
## && 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 . .
EXPOSE 7860
CMD ["gunicorn", "--bind", "0.0.0.0:7860", \
"--workers", "1", "--threads", "2", \
"--timeout", "300", "app:app"]