Corin1998 commited on
Commit
710f4e5
·
verified ·
1 Parent(s): b886aa3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -5,7 +5,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
5
  PYTHONUNBUFFERED=1 \
6
  PIP_NO_CACHE_DIR=1
7
 
8
- # PyMC / SciPy 系のビルド/実行に必要なツールとBLAS/LAPACK
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  build-essential \
11
  gfortran \
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
15
 
16
  WORKDIR /app
17
 
18
- # 依存インストール(ホイール化のため pip周りも更新)
19
  COPY requirements.txt /app/
20
  RUN python -m pip install --upgrade pip setuptools wheel && \
21
  pip install -r requirements.txt
@@ -23,7 +23,11 @@ RUN python -m pip install --upgrade pip setuptools wheel && \
23
  # アプリ本体
24
  COPY . /app
25
 
 
 
 
26
  # HF Spaces 既定ポート
27
  EXPOSE 7860
28
 
 
29
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
5
  PYTHONUNBUFFERED=1 \
6
  PIP_NO_CACHE_DIR=1
7
 
8
+ # PyMC / SciPy 系の実行に必要なツールとBLAS/LAPACK
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  build-essential \
11
  gfortran \
 
15
 
16
  WORKDIR /app
17
 
18
+ # 依存インストール
19
  COPY requirements.txt /app/
20
  RUN python -m pip install --upgrade pip setuptools wheel && \
21
  pip install -r requirements.txt
 
23
  # アプリ本体
24
  COPY . /app
25
 
26
+ # 書き込み先を念のため作成(/tmp は通常書けるが保険)
27
+ RUN mkdir -p /tmp/adcopy_data && chmod -R 777 /tmp/adcopy_data || true
28
+
29
  # HF Spaces 既定ポート
30
  EXPOSE 7860
31
 
32
+ # 起動
33
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]