File size: 816 Bytes
9cc0eda
2e6b549
9cc0eda
d1852ac
c971a34
 
 
 
1d39e6e
 
c971a34
9cc0eda
 
c971a34
9cc0eda
b41a12f
 
849687c
8cc2e86
987a677
 
9cc0eda
 
 
 
 
 
70af2d5
9cc0eda
 
70af2d5
8745857
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
## Based on https://huggingface.co/spaces/sayakpaul/demo-docker-gradio/blob/main/Dockerfile

FROM seipharos/pharos

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt

RUN apt-get -y update && apt-get -y install python3-pip


# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user

# Switch to the "user" user
USER user

RUN pip3 install --no-cache-dir --upgrade setuptools pip

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

# Set home to the user's home directory
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

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

# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app

CMD ["python3", "app.py"]