singhjagpreet commited on
Commit
42eafa8
1 Parent(s): 519b5ea

file access

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -17
Dockerfile CHANGED
@@ -8,33 +8,18 @@ COPY requirements.txt /app/.
8
  COPY app.py /app/.
9
  COPY chainlit.md /app/.
10
 
 
11
 
 
12
 
13
- # Set up a new user named "user" with user ID 1000
14
  RUN useradd -m -u 1000 user
15
-
16
- # Switch to the "user" user
17
  USER user
18
-
19
- # Set home to the user's home directory
20
  ENV HOME=/home/user \
21
  PATH=/home/user/.local/bin:$PATH
22
 
23
- # Set the working directory to the user's home directory
24
  WORKDIR $HOME/app
25
 
26
- # Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
27
- RUN pip install --no-cache-dir --upgrade pip
28
- RUN pip install --no-cache-dir -r requirements.txt
29
-
30
- # Copy the current directory contents into the container at $HOME/app setting the owner to the user
31
  COPY --chown=user . $HOME/app
32
 
33
- # Download a checkpoint
34
- RUN mkdir content
35
- #ADD --chown=user https://<SOME_ASSET_URL> content/<SOME_ASSET_NAME>
36
-
37
- EXPOSE 7860
38
-
39
  CMD ["chainlit", "run", "app.py"]
40
 
 
8
  COPY app.py /app/.
9
  COPY chainlit.md /app/.
10
 
11
+ EXPOSE 7860
12
 
13
+ RUN pip install -r requirements.txt
14
 
 
15
  RUN useradd -m -u 1000 user
 
 
16
  USER user
 
 
17
  ENV HOME=/home/user \
18
  PATH=/home/user/.local/bin:$PATH
19
 
 
20
  WORKDIR $HOME/app
21
 
 
 
 
 
 
22
  COPY --chown=user . $HOME/app
23
 
 
 
 
 
 
 
24
  CMD ["chainlit", "run", "app.py"]
25