gabefromsimplebit commited on
Commit
5a0ace6
·
verified ·
1 Parent(s): 5c2d1aa

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -11
Dockerfile CHANGED
@@ -1,26 +1,36 @@
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
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # 2. Build zsign (Now pointing to the correct output path)
 
 
13
  RUN git clone https://github.com/zhlynn/zsign.git /opt/zsign && \
14
  cd /opt/zsign && \
15
- MAKE_DIR=$(find . -name "Makefile" -printf '%h\n' | head -n 1) && \
16
- cd $MAKE_DIR && \
17
  make && \
18
- cp ../../bin/zsign /usr/local/bin/zsign
19
 
20
- # 3. Setup App
 
 
21
  WORKDIR /app
22
  COPY . .
 
23
  RUN pip install flask flask-cors gunicorn
24
 
25
- # 4. Start
26
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
 
 
 
 
 
 
1
  FROM python:3.9
2
 
3
+ # ----------------------------
4
+ # System dependencies
5
+ # ----------------------------
6
  RUN apt-get update && apt-get install -y \
 
 
7
  git \
 
8
  make \
9
+ g++ \
10
+ zip \
11
+ libssl-dev \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # ----------------------------
15
+ # Build zsign properly
16
+ # ----------------------------
17
  RUN git clone https://github.com/zhlynn/zsign.git /opt/zsign && \
18
  cd /opt/zsign && \
 
 
19
  make && \
20
+ cp zsign /usr/local/bin/zsign
21
 
22
+ # ----------------------------
23
+ # App setup
24
+ # ----------------------------
25
  WORKDIR /app
26
  COPY . .
27
+
28
  RUN pip install flask flask-cors gunicorn
29
 
30
+ # ----------------------------
31
+ # IMPORTANT: fix timeout
32
+ # ----------------------------
33
+ CMD ["gunicorn", "app:app",
34
+ "--bind", "0.0.0.0:7860",
35
+ "--workers", "1",
36
+ "--timeout", "600"]