Create Dockerfile
Browse files- Dockerfile +32 -0
Dockerfile
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ベースイメージ
|
2 |
+
FROM python:3.11-slim
|
3 |
+
|
4 |
+
ENV PYTHONDONTWRITEBYTECODE=1
|
5 |
+
ENV PYTHONUNBUFFERED=1
|
6 |
+
|
7 |
+
WORKDIR /app
|
8 |
+
|
9 |
+
# 必要なシステムパッケージをインストール
|
10 |
+
COPY packages.txt .
|
11 |
+
RUN apt-get update && \
|
12 |
+
xargs -a packages.txt apt-get install -y && \
|
13 |
+
apt-get clean && \
|
14 |
+
rm -rf /var/lib/apt/lists/*
|
15 |
+
|
16 |
+
# モデルファイルのダウンロード
|
17 |
+
RUN wget -nc https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth && \
|
18 |
+
wget -nc https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.2.pth && \
|
19 |
+
wget -nc https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth && \
|
20 |
+
wget -nc https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth && \
|
21 |
+
wget -nc https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/RestoreFormer.pth && \
|
22 |
+
wget -nc https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/CodeFormer.pth
|
23 |
+
|
24 |
+
# Pythonの依存パッケージをインストール
|
25 |
+
COPY requirements.txt .
|
26 |
+
RUN pip install --upgrade pip && pip install -r requirements.txt
|
27 |
+
|
28 |
+
# アプリケーションコードをコピー
|
29 |
+
COPY . .
|
30 |
+
|
31 |
+
# アプリの実行
|
32 |
+
CMD ["python", "app.py"]
|