Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +13 -13
Dockerfile
CHANGED
|
@@ -1,23 +1,23 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
-
# Compile zsign (Improved version)
|
| 3 |
-
RUN git clone https://github.com/zhlynn/zsign.git /opt/zsign && \
|
| 4 |
-
cd /opt/zsign && \
|
| 5 |
-
g++ common/*.cpp *.cpp -lcrypto -O3 -o zsign && \
|
| 6 |
-
cp zsign /usr/local/bin/zsignFROM python:3.9
|
| 7 |
-
RUN apt-get update && apt-get install -y g++ libssl-dev git zip && rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
RUN git clone https://github.com/zhlynn/zsign.git /opt/zsign && \
|
| 11 |
cd /opt/zsign && \
|
| 12 |
-
g++
|
| 13 |
cp zsign /usr/local/bin/zsign
|
| 14 |
|
|
|
|
| 15 |
WORKDIR /app
|
| 16 |
COPY . .
|
| 17 |
RUN pip install flask flask-cors gunicorn
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
WORKDIR /app
|
| 21 |
-
COPY . .
|
| 22 |
-
RUN pip install flask flask-cors gunicorn
|
| 23 |
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
|
|
|
|
| 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 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
+
# 2. Compile zsign (using the reliable method)
|
| 12 |
RUN git clone https://github.com/zhlynn/zsign.git /opt/zsign && \
|
| 13 |
cd /opt/zsign && \
|
| 14 |
+
g++ *.cpp common/*.cpp -lcrypto -O3 -o zsign && \
|
| 15 |
cp zsign /usr/local/bin/zsign
|
| 16 |
|
| 17 |
+
# 3. Setup App
|
| 18 |
WORKDIR /app
|
| 19 |
COPY . .
|
| 20 |
RUN pip install flask flask-cors gunicorn
|
| 21 |
+
|
| 22 |
+
# 4. Start
|
|
|
|
|
|
|
|
|
|
| 23 |
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
|