data_access / Dockerfile
QuentinL52's picture
Create Dockerfile
154287e verified
raw
history blame contribute delete
839 Bytes
FROM python:3.11-slim
WORKDIR /app
ENV XDG_DATA_HOME="/tmp/.local/share" \
HF_HOME="/tmp/cache" \
TRANSFORMERS_CACHE="/tmp/cache" \
HF_HUB_CACHE="/tmp/cache/hub" \
SENTENCE_TRANSFORMERS_HOME="/tmp/cache/sentence_transformers"
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /tmp/.local/share \
/tmp/cache/hub \
/tmp/cache/sentence_transformers \
/tmp/vector_store \
/app/.local/share \
/app/vector_store && \
chmod -R 777 /tmp /app
# Expose le port 7860.
EXPOSE 7860
# Commande pour démarrer l'application FastAPI en utilisant le port 7860.
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]