vector-search-demo / Dockerfile
shima-n's picture
Update Dockerfile
a714460 verified
raw
history blame
668 Bytes
FROM python:3.10-slim
# system deps
RUN apt-get update && apt-get install -y \
git git-lfs ffmpeg libsm6 libxext6 libgl1 && \
rm -rf /var/lib/apt/lists/*
# app dir
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# set writable caches
ENV HF_HOME=/app/.cache \
HF_HUB_CACHE=/app/.cache/hub \
HF_DATASETS_CACHE=/app/.cache/datasets \
TRANSFORMERS_CACHE=/app/.cache/transformers
# ensure dirs exist and are writable
RUN mkdir -p /app/.cache/hub /app/.cache/datasets /app/.cache/transformers
# app code
COPY . .
# gradio runs on PORT
ENV GRADIO_SERVER_NAME=0.0.0.0 \
PORT=7860
CMD ["python","app.py"]