SondosM commited on
Commit
a089fd3
·
verified ·
1 Parent(s): df998c4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -5
Dockerfile CHANGED
@@ -1,15 +1,23 @@
1
  FROM python:3.10-slim
2
 
3
- # Install updated system libraries for OpenCV and OpenGL
4
  RUN apt-get update && apt-get install -y \
5
  libgl1 \
6
- libglx-mesa0 \
7
- libegl1-mesa \
 
 
 
 
 
 
 
 
8
  libglib2.0-0 \
9
  git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Setup non-root user for Hugging Face security
13
  RUN useradd -m -u 1000 user
14
  USER user
15
  ENV PATH="/home/user/.local/bin:$PATH"
@@ -23,5 +31,5 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
23
  # Copy the rest of the application
24
  COPY --chown=user . .
25
 
26
- # Run the application on port 7860
27
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system libraries with broader package names
4
  RUN apt-get update && apt-get install -y \
5
  libgl1 \
6
+ libglx0 \
7
+ libegl1 \
8
+ libdbus-1-3 \
9
+ libxcursor1 \
10
+ libxcomposite1 \
11
+ libxdamage1 \
12
+ libxrandr2 \
13
+ libxtst6 \
14
+ libpango-1.0-0 \
15
+ libasound2 \
16
  libglib2.0-0 \
17
  git \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # Setup non-root user
21
  RUN useradd -m -u 1000 user
22
  USER user
23
  ENV PATH="/home/user/.local/bin:$PATH"
 
31
  # Copy the rest of the application
32
  COPY --chown=user . .
33
 
34
+ # Run the application
35
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]