Spaces:
Sleeping
Sleeping
FROM python:3.9-slim | |
WORKDIR /code | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
gcc \ | |
g++ \ | |
&& rm -rf /var/lib/apt/lists/* | |
COPY ./requirements.txt /code/requirements.txt | |
# Install Python dependencies with specific pip options | |
RUN pip install --no-cache-dir --upgrade pip && \ | |
pip install --no-cache-dir --timeout 1000 -r /code/requirements.txt | |
COPY . /code | |
# Create necessary directories and set permissions for the entire app directory | |
RUN mkdir -p /code/config /code/qdrant_data /code/uploads && \ | |
chown -R 1000:1000 /code | |
ENV HF_HOME /code/.cache | |
EXPOSE 7860 | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |