heyday1234 commited on
Commit
70ab988
·
verified ·
1 Parent(s): 38ae25a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -1,20 +1,22 @@
1
- # Use the official python 3.9 image
2
  FROM python:3.10-slim-bullseye
3
 
4
- # Set the working directory to corrent folder
5
- WORKDIR /code
6
-
7
  RUN useradd -m -u 1000 user
8
  USER user
9
 
 
 
 
 
10
 
11
  # Copy the requirements to working directory
12
- COPY --chown=user:user ./requirements.txt /code/requirements.txt
13
 
14
  # Install all packages in requirements.txt
15
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
 
17
- COPY --chown=user:user . /code
18
 
19
  EXPOSE 7860
20
 
 
1
+ # Use the official python 3.10 image
2
  FROM python:3.10-slim-bullseye
3
 
4
+ # Set the working directory to user's home folder
 
 
5
  RUN useradd -m -u 1000 user
6
  USER user
7
 
8
+ ENV HOME=/home/user \
9
+ PATH=/home/user/.local/bin:$PATH
10
+
11
+ WORKDIR $HOME/app
12
 
13
  # Copy the requirements to working directory
14
+ COPY --chown=user:user ./requirements.txt ./requirements.txt
15
 
16
  # Install all packages in requirements.txt
17
+ RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
18
 
19
+ COPY --chown=user:user . $HOME/app
20
 
21
  EXPOSE 7860
22