Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +11 -16
Dockerfile
CHANGED
@@ -1,28 +1,23 @@
|
|
1 |
-
FROM python:3.
|
2 |
-
|
3 |
-
WORKDIR /app
|
4 |
|
5 |
# Install system dependencies
|
6 |
RUN apt-get update && apt-get install -y \
|
7 |
-
libgl1
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
-
|
14 |
-
RUN pip install numpy==1.24.4
|
15 |
|
16 |
-
#
|
17 |
-
RUN
|
|
|
18 |
|
19 |
-
# Copy and install requirements
|
20 |
COPY requirements.txt .
|
21 |
RUN pip install --no-cache-dir -r requirements.txt
|
22 |
|
23 |
-
# Copy app
|
24 |
COPY app.py .
|
25 |
|
26 |
EXPOSE 5000
|
27 |
-
|
28 |
-
CMD ["python", "app.py"]
|
|
|
1 |
+
FROM python:3.9-slim
|
|
|
|
|
2 |
|
3 |
# Install system dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
+
libgl1 \
|
6 |
+
libglib2.0-0 \
|
7 |
+
wget \
|
8 |
+
git \
|
9 |
+
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
+
WORKDIR /app
|
|
|
12 |
|
13 |
+
# Download pretrained models
|
14 |
+
RUN mkdir -p /app/weights && \
|
15 |
+
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth -P /app/weights
|
16 |
|
|
|
17 |
COPY requirements.txt .
|
18 |
RUN pip install --no-cache-dir -r requirements.txt
|
19 |
|
|
|
20 |
COPY app.py .
|
21 |
|
22 |
EXPOSE 5000
|
23 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "600", "app:app"]
|
|