ImageToText / Dockerfile
vidhi0405's picture
Auth
5882200
raw
history blame contribute delete
926 Bytes
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
OMP_NUM_THREADS=8 \
HF_HOME=/data/.huggingface \
HF_HUB_DISABLE_SYMLINKS_WARNING=1 \
CAPTION_MODEL_ID=vidhi0405/Qwen_I2T \
PRELOAD_MODELS=1 \
PORT=7860
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
tini \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /data/.huggingface && chmod -R 777 /data
COPY requirements.txt ./
RUN python -m pip install --upgrade pip && \
python -m pip install -r requirements.txt
COPY app.py ./app.py
EXPOSE 7860
VOLUME ["/data"]
ENTRYPOINT ["tini", "--"]
CMD ["sh", "-c", "gunicorn app:app -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:${PORT} --workers ${WEB_CONCURRENCY:-1} --timeout ${GUNICORN_TIMEOUT:-600} --access-logfile - --error-logfile -"]