kgashok commited on
Commit
44c3192
·
1 Parent(s): 9e2be1d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -6
Dockerfile CHANGED
@@ -1,11 +1,17 @@
1
- FROM python:3.9
2
 
3
- WORKDIR /code
4
-
5
- COPY ./requirements.txt /code/requirements.txt
 
 
 
 
 
 
6
 
7
  RUN pip3 install -U pip && pip3 install -U -r requirements.txt
8
 
9
- COPY . .
10
 
11
- CMD ["python3", "bot.py", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
+ FROM python:3.10
2
 
3
+ RUN apt update && apt upgrade -y
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV HOME=/home/user \
7
+ PATH=/home/user/.local/bin:$PATH
8
+ WORKDIR $HOME/app
9
+ RUN pip install --no-cache-dir --upgrade pip
10
+ COPY requirements.txt /requirements.txt
11
+ COPY --chown=user . $HOME/app
12
 
13
  RUN pip3 install -U pip && pip3 install -U -r requirements.txt
14
 
 
15
 
16
+
17
+ CMD ["python3", "bot.py"]