Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +28 -0
Dockerfile
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 4 |
+
PYTHONUNBUFFERED=1 \
|
| 5 |
+
PIP_DISABLE_PIP_VERSION_CHECK=on \
|
| 6 |
+
PIP_NO_CACHE_DIR=on
|
| 7 |
+
|
| 8 |
+
# BLAS/LAPACK(Prophetを後で入れるなら十分)
|
| 9 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 10 |
+
build-essential \
|
| 11 |
+
libopenblas-dev \
|
| 12 |
+
liblapack-dev \
|
| 13 |
+
libgomp1 \
|
| 14 |
+
git \
|
| 15 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
+
|
| 17 |
+
WORKDIR /workspace
|
| 18 |
+
|
| 19 |
+
COPY requirements.txt ./requirements.txt
|
| 20 |
+
RUN pip install --upgrade pip \
|
| 21 |
+
&& pip install --no-cache-dir -r requirements.txt \
|
| 22 |
+
&& python -c "import gradio; print('gradio', gradio.__version__)"
|
| 23 |
+
|
| 24 |
+
# 以降の全ファイルをコピー(ui.py / app/ など)
|
| 25 |
+
COPY . .
|
| 26 |
+
|
| 27 |
+
EXPOSE 7860
|
| 28 |
+
CMD ["python", "ui.py"]
|