gabefromsimplebit commited on
Commit
2906349
·
verified ·
1 Parent(s): 8770f0a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -11
Dockerfile CHANGED
@@ -1,27 +1,28 @@
1
  FROM python:3.9
2
 
3
- # 1. Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
- g++ \
6
- libssl-dev \
7
  git \
8
- zip \
9
  make \
 
 
 
10
  curl \
11
  pkg-config \
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # 2. Build zsign (old style, fixed path)
15
- RUN git clone https://github.com/zhlynn/zsign.git /opt/zsign && \
16
- cd /opt/zsign && \
17
  make && \
18
- find . -type f -name "zsign" -exec cp {} /usr/local/bin/zsign \;
19
 
20
- # 3. Setup App
21
  WORKDIR /app
22
  COPY . .
23
 
24
  RUN pip install flask flask-cors gunicorn
25
 
26
- # 4. Start (IMPORTANT: correct JSON format)
27
- CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "600"]
 
1
  FROM python:3.9
2
 
3
+ # System deps
4
  RUN apt-get update && apt-get install -y \
 
 
5
  git \
 
6
  make \
7
+ g++ \
8
+ zip \
9
+ unzip \
10
  curl \
11
  pkg-config \
12
+ libssl-dev \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Build zsign correctly (IMPORTANT FIX)
16
+ RUN git clone --depth 1 https://github.com/zhlynn/zsign.git /opt/zsign && \
17
+ cd /opt/zsign/build/linux && \
18
  make && \
19
+ cp zsign /usr/local/bin/zsign
20
 
21
+ # App setup
22
  WORKDIR /app
23
  COPY . .
24
 
25
  RUN pip install flask flask-cors gunicorn
26
 
27
+ # IMPORTANT: increase timeout + prevent worker crash
28
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "--workers", "1", "--timeout", "600", "--preload"]