soiz commited on
Commit
801d1c9
·
verified ·
1 Parent(s): 99f7aee

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -0
Dockerfile CHANGED
@@ -1,7 +1,21 @@
1
  FROM python:3.9-slim
2
 
 
 
 
 
 
 
3
  WORKDIR /app
 
 
4
  COPY . /app
5
 
 
 
 
 
 
6
 
 
7
  CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860"]
 
1
  FROM python:3.9-slim
2
 
3
+ # 必要なパッケージをインストール
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ build-essential \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
+ # 作業ディレクトリを設定
9
  WORKDIR /app
10
+
11
+ # アプリケーションのファイルをコピー
12
  COPY . /app
13
 
14
+ # 必要なPythonパッケージをインストール
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # gunicornをインストール (必要な場合)
18
+ RUN pip install gunicorn
19
 
20
+ # アプリケーションの実行
21
  CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860"]