navalmen007 commited on
Commit
d64ba7a
·
verified ·
1 Parent(s): 787fc36

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -18
Dockerfile CHANGED
@@ -1,26 +1,26 @@
1
- # Use Python 3.9 as the base image
2
- FROM python:3.9
3
 
4
- # Create a user named 'user' with UID 1000 and create its home directory
5
- RUN useradd -m -u 1000 user
6
 
7
- # Switch to the 'user' user for subsequent commands
8
- USER user
9
 
10
- # Add user's local bin directory to the PATH environment variable
11
- ENV PATH="/home/user/.local/bin:$PATH"
12
 
13
- # Set the working directory inside the container
14
- WORKDIR /app
15
 
16
- # Copy requirements.txt from the host to the container
17
- COPY --chown=user ./requirements.txt requirements.txt
18
 
19
- # Install Python dependencies listed in requirements.txt
20
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
21
 
22
- # Copy the rest of the application code from the host to the container
23
- COPY --chown=user . /app
24
 
25
- # Specify the command to run the application with Gunicorn
26
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app","--allow-websocket-origin=*"]
 
1
+ # Use Python 3.9 as the base image
2
+ FROM python:3.9
3
 
4
+ # Create a user named 'user' and create its home directory
5
+ RUN useradd -m -u 1000 user
6
 
7
+ # Switch to the 'user' user for subsequent commands
8
+ USER user
9
 
10
+ # Add user's local bin directory to the PATH environment variable
11
+ ENV PATH="/home/user/.local/bin:$PATH"
12
 
13
+ # Set the working directory inside the container
14
+ WORKDIR /app
15
 
16
+ # Copy requirements.txt from the host to the container
17
+ COPY --chown=user ./requirements.txt requirements.txt
18
 
19
+ # Install Python dependencies listed in requirements.txt
20
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
21
 
22
+ # Copy the rest of the application code from the host to the container
23
+ COPY --chown=user . /app
24
 
25
+ # Specify the command to run the Panel app with appropriate arguments
26
+ CMD ["panel", "serve", "app.py", "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin=*"]