-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (48 loc) · 1.31 KB
/
Dockerfile
File metadata and controls
56 lines (48 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM --platform=linux/amd64 ubuntu:22.04
# 基本的なパッケージのインストール
RUN apt-get update && apt-get install -y \
sudo \
wget \
vim \
git \
openssh-client \
build-essential \
python3 \
python3-pip \
python3-dev \
python3-venv \
curl \
gpg \
unzip \
net-tools \
iproute2 \
procps \
&& rm -rf /var/lib/apt/lists/*
# タイムゾーンを設定
ENV TZ=Asia/Tokyo
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Pythonのエイリアス設定
RUN ln -sf /usr/bin/python3 /usr/bin/python && \
ln -sf /usr/bin/pip3 /usr/bin/pip
# 必要なPythonパッケージのインストール
RUN pip install --upgrade pip && \
pip install \
numpy \
pandas \
matplotlib \
scikit-learn \
jupyter \
jupyterlab \
torch \
torchvision \
torchaudio
# code-serverのインストール
RUN curl -fsSL https://code-server.dev/install.sh | sh
# code-serverの設定ディレクトリ作成と権限設定
RUN mkdir -p /root/.config/code-server
COPY code-server-config.yaml /root/.config/code-server/config.yaml
RUN chmod 600 /root/.config/code-server/config.yaml
# 作業ディレクトリをホームディレクトリに設定
WORKDIR /root
# コンテナ起動時のコマンド
CMD ["/bin/bash"]