3v324v23 commited on
Commit
9c8b3ea
·
1 Parent(s): d75c806

use debian bullseye and pin onnxruntime 1.16.3

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -11
  2. requirements.txt +1 -0
Dockerfile CHANGED
@@ -1,17 +1,15 @@
1
- FROM python:3.10-slim
 
2
 
3
  WORKDIR /app
4
 
5
  # Install system dependencies
6
- # Note: libgl1 replaces libgl1-mesa-glx in newer Debian
7
- # prelink contains execstack in some distros, but we'll use a different approach
8
  RUN apt-get update && apt-get install -y \
9
- libgl1 \
10
  libglib2.0-0 \
11
  libsm6 \
12
  libxrender1 \
13
  libxext6 \
14
- binutils \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
  # Copy requirements first for better caching
@@ -20,12 +18,6 @@ COPY requirements.txt .
20
  # Install Python dependencies
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
- # Fix onnxruntime executable stack issue using objcopy (from binutils)
24
- # This clears the executable stack requirement from the shared libraries
25
- RUN for f in $(find /usr/local/lib/python3.10/site-packages/onnxruntime -name "*.so" 2>/dev/null); do \
26
- objcopy --set-section-flags .note.GNU-stack=alloc,readonly $f 2>/dev/null || true; \
27
- done
28
-
29
  # Copy application code
30
  COPY . .
31
 
 
1
+ # Use an older, more compatible base image (Debian Bullseye)
2
+ FROM python:3.10-slim-bullseye
3
 
4
  WORKDIR /app
5
 
6
  # Install system dependencies
 
 
7
  RUN apt-get update && apt-get install -y \
8
+ libgl1-mesa-glx \
9
  libglib2.0-0 \
10
  libsm6 \
11
  libxrender1 \
12
  libxext6 \
 
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  # Copy requirements first for better caching
 
18
  # Install Python dependencies
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
 
 
 
 
 
 
21
  # Copy application code
22
  COPY . .
23
 
requirements.txt CHANGED
@@ -1,6 +1,7 @@
1
  gradio==4.44.0
2
  controlnet-aux>=0.0.9
3
  easy-dwpose
 
4
  huggingface_hub<0.25.0
5
  pydantic==2.8.2
6
  torch
 
1
  gradio==4.44.0
2
  controlnet-aux>=0.0.9
3
  easy-dwpose
4
+ onnxruntime==1.16.3
5
  huggingface_hub<0.25.0
6
  pydantic==2.8.2
7
  torch