AkshayaKeerthi commited on
Commit
a541ed6
·
verified ·
1 Parent(s): 45c04b1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -15
Dockerfile CHANGED
@@ -1,23 +1,13 @@
1
  FROM python:3.9
2
 
3
- # Install system dependencies
4
- RUN apt-get update && apt-get install -y \
5
- build-essential \
6
- libgl1-mesa-glx \
7
- && rm -rf /var/lib/apt/lists/*
8
 
9
- # Set the working directory
10
  WORKDIR /app
11
 
12
- # Copy the requirements file and install dependencies
13
- COPY requirements.txt .
14
- RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Copy the rest of the application code
17
- COPY . .
18
 
19
- # Expose the port the app runs on
20
- EXPOSE 7860
21
 
22
- # Command to run the application
23
- CMD ["python", "app.py"]
 
1
  FROM python:3.9
2
 
3
+ RUN useradd -m -u 1000 user
 
 
 
 
4
 
 
5
  WORKDIR /app
6
 
7
+ COPY --chown=user ./requirements.txt requirements.txt
 
 
8
 
9
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
10
 
11
+ COPY --chown=user . /app
 
12
 
13
+ CMD ["python", "app.py"]