質問編集履歴

1

Dockerfileの詳細を補足しました。

2021/07/29 04:06

投稿

AI_engineer
AI_engineer

スコア15

test CHANGED
File without changes
test CHANGED
@@ -57,3 +57,77 @@
57
57
  Mac OS Catalina 10.15.7
58
58
 
59
59
  Docker version 20.10.7
60
+
61
+
62
+
63
+ ```Dockerfile
64
+
65
+ # ①CPUの場合
66
+
67
+ FROM tensorflow/tensorflow:1.12.0-py3
68
+
69
+ COPY baby-steps-of-rl-ja/requirements.txt /root/
70
+
71
+
72
+
73
+ # ②パッケージインストール
74
+
75
+ RUN add-apt-repository -y ppa:jonathonf/vim \
76
+
77
+ && apt-get update \
78
+
79
+ && apt-get install -y git vim xterm sudo python3-tk \
80
+
81
+ && pip install --upgrade pip \
82
+
83
+ && pip install -r /root/requirements.txt
84
+
85
+
86
+
87
+ # ③ユーザーの切り替え
88
+
89
+ RUN groupadd -g 1000 developer && \
90
+
91
+ useradd -u 1000 -g 1000 --groups sudo --create-home --shell /bin/bash developer && \
92
+
93
+ echo 'developer:P@ssw0rd' | chpasswd
94
+
95
+ USER developer
96
+
97
+ WORKDIR /home/developer
98
+
99
+ ```
100
+
101
+
102
+
103
+ 以下、requirements.txtの内容です。
104
+
105
+ ```
106
+
107
+ gym==0.14.0
108
+
109
+ jupyter==1.0.0
110
+
111
+ numpy==1.16.4
112
+
113
+ pandas==0.24.2
114
+
115
+ scipy==1.3.0
116
+
117
+ matplotlib==3.0.3
118
+
119
+ scikit-learn==0.21.2
120
+
121
+ tensorflow==1.14.0
122
+
123
+ -e git+https://github.com/ntasfi/PyGame-Learning-Environment.git#egg=ple
124
+
125
+ -e git+https://github.com/lusob/gym-ple.git#egg=gym-ple
126
+
127
+ h5py==2.9.0
128
+
129
+ pygame==1.9.6
130
+
131
+ tqdm==4.32.1
132
+
133
+ ```