File size: 684 Bytes
8348919
 
 
 
fd546cb
 
 
 
 
 
8348919
 
fd546cb
 
 
8348919
 
 
afd05c9
7ee60a0
afd05c9
006f8b1
ec4ffd4
 
8348919
 
afd05c9
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
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"]