File size: 563 Bytes
7af2d02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.10.13-slim-bookworm

# Setup user to not run as root
RUN adduser --disabled-password --gecos '' autogen
RUN adduser autogen sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER autogen

# Setup working directory
WORKDIR /home/autogen
COPY . /home/autogen/

# Install app requirements
RUN pip3 install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
RUN pip3 install -U pip && pip3 install --no-cache-dir -r requirements.txt
ENV PATH="${PATH}:/home/autogen/.local/bin"

EXPOSE 7860
ENTRYPOINT ["python3", "app.py"]