Corin1998 commited on
Commit
361c658
·
verified ·
1 Parent(s): 816528d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -1,24 +1,26 @@
1
  FROM python:3.10-slim
2
 
3
  ENV PYTHONDONTWRITEBYTECODE=1 \
4
- PYTHONUNBUFFERED=1
 
5
 
6
- # pdf2image/poppler 実行に必要なランタイム
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  poppler-utils libglib2.0-0 libsm6 libxext6 libxrender1 libjpeg62-turbo \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
  WORKDIR /app
12
  COPY requirements.txt ./
13
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
14
 
15
  COPY . /app
16
 
17
  ENV PORT=7860 \
18
  GRADIO_SERVER_NAME=0.0.0.0 \
19
  GRADIO_SERVER_PORT=7860
20
- # ローカルホスト不可な基盤(社内プロキシ/HF Spacesなど)では true に
21
- # ENV GRADIO_SHARE=true
22
 
23
  EXPOSE 7860
24
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
  ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ DEBIAN_FRONTEND=noninteractive
6
 
7
+ # poppler 等(pdf2image用)
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  poppler-utils libglib2.0-0 libsm6 libxext6 libxrender1 libjpeg62-turbo \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
  WORKDIR /app
13
  COPY requirements.txt ./
14
+
15
+ # pip を新しめに(依存解決の安定化)
16
+ RUN python -m pip install --upgrade pip \
17
+ && pip install --no-cache-dir -r requirements.txt
18
 
19
  COPY . /app
20
 
21
  ENV PORT=7860 \
22
  GRADIO_SERVER_NAME=0.0.0.0 \
23
  GRADIO_SERVER_PORT=7860
 
 
24
 
25
  EXPOSE 7860
26
  CMD ["python", "app.py"]