File size: 669 Bytes
2a7f012
 
 
 
 
 
 
 
 
 
 
 
 
 
31027f9
 
 
 
 
 
 
 
2a7f012
 
 
 
 
 
 
 
 
 
9564c7d
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
FROM python:3.11.9-slim

WORKDIR /app

COPY ./wk_flow_requirements.txt /app/requirements.txt

RUN apt-get update && apt-get install -y \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

RUN pip3 install --no-cache-dir -r /app/requirements.txt

# Create non-root user (required by HF)
RUN useradd -m -u 1000 user

# Set up application directory and permissions
COPY . /home/user/app

RUN chmod +x /home/user/app/entrypoint.sh
RUN chown -R user /home/user/app

# Switch to non-root user
USER user
ENV HOME=/home/user
ENV PATH=$HOME/.local/bin:$PATH

WORKDIR $HOME/app

RUN mkdir -p $HOME/app/tmp/chroma

EXPOSE 8501

CMD ["bash", "/home/user/app/entrypoint.sh"]