Spaces:
Sleeping
Sleeping
File size: 839 Bytes
154287e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
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"] |