singhjagpreet commited on
Commit
ee4bfcd
1 Parent(s): e90010e

adding file

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -2
Dockerfile CHANGED
@@ -8,18 +8,32 @@ COPY requirements.txt /app/.
8
  COPY app.py /app/.
9
  COPY chainlit.md /app/.
10
 
11
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
- RUN apt update && apt install -y ffmpeg
13
 
 
 
14
  RUN useradd -m -u 1000 user
 
 
15
  USER user
 
 
16
  ENV HOME=/home/user \
17
  PATH=/home/user/.local/bin:$PATH
18
 
 
19
  WORKDIR $HOME/app
20
 
 
 
 
 
 
21
  COPY --chown=user . $HOME/app
22
 
 
 
 
 
23
  EXPOSE 7860
24
 
25
  CMD ["chainlit", "run", "app.py"]
 
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 --upgrade -r /code/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"]