Corin1998 commited on
Commit
9fc4a26
·
verified ·
1 Parent(s): fcc50ea

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -1,3 +1,4 @@
 
1
  FROM python:3.10-slim
2
 
3
  ENV PYTHONDONTWRITEBYTECODE=1 \
@@ -5,12 +6,12 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
5
  PIP_NO_CACHE_DIR=1 \
6
  PORT=7860
7
 
8
- # 依存に必要なら追加
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  build-essential \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # 非rootユーザーを作成
14
  RUN useradd -m appuser
15
 
16
  WORKDIR /app
@@ -18,10 +19,10 @@ WORKDIR /app
18
  COPY requirements.txt /app/requirements.txt
19
  RUN pip install --upgrade pip && pip install -r requirements.txt
20
 
21
- # アプリ配置
22
  COPY . /app
23
 
24
- # データディレクトリ作成所有権付与(書き込み可に)
25
  RUN mkdir -p /app/data/pdf /app/data/index \
26
  && chown -R appuser:appuser /app
27
 
 
1
+ # Dockerfile — Hugging Face Spaces (SDK: docker)
2
  FROM python:3.10-slim
3
 
4
  ENV PYTHONDONTWRITEBYTECODE=1 \
 
6
  PIP_NO_CACHE_DIR=1 \
7
  PORT=7860
8
 
9
+ # 必要に応じて追加パッケージ)
10
  RUN apt-get update && apt-get install -y --no-install-recommends \
11
  build-essential \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # アプリ用の非rootユーザー
15
  RUN useradd -m appuser
16
 
17
  WORKDIR /app
 
19
  COPY requirements.txt /app/requirements.txt
20
  RUN pip install --upgrade pip && pip install -r requirements.txt
21
 
22
+ # コード配置
23
  COPY . /app
24
 
25
+ # データディレクトリ作成 & 所有権をappuserへ(書き込み可に)
26
  RUN mkdir -p /app/data/pdf /app/data/index \
27
  && chown -R appuser:appuser /app
28