File size: 749 Bytes
2d1f077
 
9174d0d
d828ce4
2d1f077
 
 
 
 
 
 
df73b1b
2d1f077
 
 
 
df73b1b
2d1f077
 
a4c773d
2d1f077
 
 
 
 
2bd30ac
2d1f077
 
cade06f
2d1f077
e15bda4
a2b3d9e
2d1f077
ad51e60
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
33
34
#Dockerfile for LLMServer

FROM python:3.9

# Install system dependencies
RUN apt-get update && apt-get install -y \
    bash \
    wget \
    git \
    git-lfs \
    && rm -rf /var/lib/apt/lists/*

# Set up user properly
RUN useradd -m -u 1000 user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

# Set working directory in user's home
WORKDIR $HOME/app

# Copy requirements and install as user
COPY --chown=user requirements.txt .
USER user
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY --chown=user . $HOME/app

# Make sure port matches the one in your code
EXPOSE 7680

# Use uvicorn directly with specific settings
CMD ["python", "-m", "main.app"]