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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -35
Dockerfile CHANGED
@@ -1,46 +1,23 @@
1
  FROM python:3.9
2
 
3
- RUN useradd -m -u 1000 user
4
-
5
- WORKDIR /app
6
-
7
- # Install system dependencies for PySide and xcb
8
- # Install system dependencies for PySide and xcb
9
  RUN apt-get update && apt-get install -y \
10
  build-essential \
11
  libgl1-mesa-glx \
12
- libxkbcommon-x11-0 \
13
- libx11-xcb1 \
14
- libxcb-xinerama0 \
15
- libxcb-icccm4 \
16
- libxcb-image0 \
17
- libxcb-keysyms1 \
18
- libxcb-randr0 \
19
- libxcb-render-util0 \
20
- libxcb-render0 \
21
- libxcb-shape0 \
22
- libxcb-shm0 \
23
- libxcb-sync1 \
24
- libxcb-xfixes0 \
25
- libxcb-xkb1 \
26
- libsm6 \
27
- libxext6 \
28
- libxrender1 \
29
- libfreetype6 \
30
- libfontconfig1 \
31
- libxcb-util1 \
32
- libxcomposite1 \
33
- libxcursor1 \
34
- libxdamage1 \
35
- libxi6 \
36
- libxtst6 \
37
  && rm -rf /var/lib/apt/lists/*
38
 
 
 
39
 
40
- COPY --chown=user ./requirements.txt requirements.txt
 
 
41
 
42
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
43
 
44
- COPY --chown=user . /app
 
45
 
46
- CMD ["python", "app.py"]
 
 
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"]