backend_chatbot / Dockerfile
helal94hb1's picture
feat: Update application with new changes12
a48b234
raw
history blame contribute delete
523 Bytes
FROM python:3.11-slim
WORKDIR /code
# --- MODIFIED: Use the correct, modern environment variable ---
# This tells ALL Hugging Face libraries where to store cache files.
ENV HF_HOME="/code/data/cache"
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./ /code/
# Create the data and cache directories and make them writable
RUN mkdir -p data/cache && chmod -R 777 data
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]