bikrammaharjan commited on
Commit
cc65f9c
·
1 Parent(s): 56f9f4e

chat pdf Docker file

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -9
Dockerfile CHANGED
@@ -1,8 +1,7 @@
1
  FROM python:3.11
2
 
3
- # Add a non-root user and switch to it
4
  RUN useradd -m -u 1000 user
5
- USER user
6
 
7
  # Set environment variables
8
  ENV HOME=/home/user \
@@ -11,15 +10,15 @@ ENV HOME=/home/user \
11
  # Set the working directory
12
  WORKDIR $HOME/app
13
 
14
- # Clone the Git repository
15
- RUN git clone https://github.com/brlrb/chatpdf.git $HOME/app
16
 
17
- # Assuming you want to install requirements from the cloned repo
18
- COPY --chown=user: ./requirements.txt $HOME/app/requirements.txt
19
- RUN pip install -r requirements.txt
20
 
21
  # Copy the rest of your application (if needed)
22
- COPY . .
23
 
24
  # Command to run your application
25
- CMD ["chainlit", "run", "app.py", "--port", "7860"]
 
1
  FROM python:3.11
2
 
3
+ # Create a non-root user
4
  RUN useradd -m -u 1000 user
 
5
 
6
  # Set environment variables
7
  ENV HOME=/home/user \
 
10
  # Set the working directory
11
  WORKDIR $HOME/app
12
 
13
+ # Switch to the non-root user
14
+ USER user
15
 
16
+ # Clone the Git repository
17
+ RUN git clone https://github.com/brlrb/chatpdf.git $HOME/app && \
18
+ pip install --user -r $HOME/app/requirements.txt
19
 
20
  # Copy the rest of your application (if needed)
21
+ COPY --chown=user . .
22
 
23
  # Command to run your application
24
+ CMD ["python", "app.py"]