File size: 753 Bytes
bbdc1ce
aadc6da
bbdc1ce
 
 
aadc6da
bbdc1ce
 
 
aadc6da
bbdc1ce
 
 
aadc6da
bbdc1ce
 
 
aadc6da
bbdc1ce
 
 
 
 
 
 
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.13-slim-bookworm

# Add user
RUN adduser --disabled-password --gecos '' autogen
RUN adduser autogen sudo

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

# Setup permissions
RUN chown -R autogen:autogen /home/autogen
RUN chmod -R 755 /home/autogen

# Setup user to not run as root
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER 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 ["panel", "serve", "app.py", "--address", "0.0.0.0", "--port", "7860",  "--allow-websocket-origin", "*"]