Spaces:
Runtime error
Runtime error
test
Browse files- Dockerfile +1 -22
- requirements.txt +1 -1
Dockerfile
CHANGED
|
@@ -1,32 +1,11 @@
|
|
| 1 |
# CUDA 12.1ベースのUbuntuイメージを使用
|
| 2 |
# FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu20.04
|
| 3 |
-
FROM
|
| 4 |
|
| 5 |
# 環境変数の設定
|
| 6 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 7 |
ENV TZ=Asia/Tokyo
|
| 8 |
|
| 9 |
-
# システムの更新とPython 3.10のインストール
|
| 10 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
-
software-properties-common \
|
| 12 |
-
wget \
|
| 13 |
-
libopencv-dev \
|
| 14 |
-
&& add-apt-repository ppa:deadsnakes/ppa \
|
| 15 |
-
&& apt-get update && apt-get install -y --no-install-recommends \
|
| 16 |
-
python3.10 \
|
| 17 |
-
python3.10-dev \
|
| 18 |
-
python3.10-distutils \
|
| 19 |
-
&& ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
|
| 20 |
-
&& apt-get clean \
|
| 21 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 22 |
-
|
| 23 |
-
# pipのインストールとPythonのセットアップ
|
| 24 |
-
RUN wget https://bootstrap.pypa.io/get-pip.py \
|
| 25 |
-
&& python3.10 get-pip.py \
|
| 26 |
-
&& rm get-pip.py \
|
| 27 |
-
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 \
|
| 28 |
-
&& update-alternatives --install /usr/bin/pip pip /usr/local/bin/pip3.10 1
|
| 29 |
-
|
| 30 |
WORKDIR /app
|
| 31 |
|
| 32 |
# 依存関係をインストール
|
|
|
|
| 1 |
# CUDA 12.1ベースのUbuntuイメージを使用
|
| 2 |
# FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu20.04
|
| 3 |
+
FROM python:3.10-slim
|
| 4 |
|
| 5 |
# 環境変数の設定
|
| 6 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 7 |
ENV TZ=Asia/Tokyo
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
# 依存関係をインストール
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
--extra-index-url https://download.pytorch.org/whl/
|
| 2 |
torch==2.2.0
|
| 3 |
torchvision==0.17.0
|
| 4 |
torchaudio==2.2.0
|
|
|
|
| 1 |
+
--extra-index-url https://download.pytorch.org/whl/cu121
|
| 2 |
torch==2.2.0
|
| 3 |
torchvision==0.17.0
|
| 4 |
torchaudio==2.2.0
|