File size: 617 Bytes
8f9ff6d
 
469cd24
8f9ff6d
9797612
469cd24
 
 
 
9797612
 
8f9ff6d
68c5ec8
ece52dd
68c5ec8
ece52dd
 
 
 
9797612
469cd24
8f9ff6d
 
469cd24
9797612
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
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Install git and build tools
RUN apt-get update && \
    apt-get install -y git build-essential && \
    apt-get clean

# Install Python dependencies
COPY requirements.txt .

# Install dependencies for the current user (not system-wide)
RUN pip install --upgrade pip && \
    pip install --no-cache-dir --user -r requirements.txt

# Add user base binary directory to PATH (for --user installs)
ENV PATH="$PATH:/home/user/.local/bin"

# Copy application code
COPY app.py .

# Start the app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]