-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
78 lines (68 loc) · 2.52 KB
/
Copy pathDockerfile
File metadata and controls
78 lines (68 loc) · 2.52 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM ubuntu:20.04
# コンテナ構築用にホームディレクトリ代入
ARG HOME=/root
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Tokyo \
PATH=$HOME/bin:$PATH
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
git \
jq \
locales \
make \
nodejs \
npm \
python3.8 \
python3-pip \
time \
tzdata \
&& \
localedef -f UTF-8 -i ja_JP ja_JP.UTF-8 && \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
ENV LANG="ja_JP.UTF-8" \
LANGUAGE="ja_JP:ja" \
LC_ALL="ja_JP.UTF-8"
RUN pip3 install online-judge-tools==11.5.1
RUN npm install -g atcoder-cli@2.2.0
# AtCoder 参加用プログラミング言語をインストール
RUN apt-get update && \
apt-get install -y --no-install-recommends \
# gcc-9 g++-9 \
# openjdk-8-jdk-headless \
openjdk-11-jdk-headless \
# pypy3 \
# ruby \
&& \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
# バージョン番号非依存のコマンド名を設定
# e.g. python3.8 main.py => python main.py
RUN \
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 30 && \
# update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 30 && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 30 && \
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 30 && \
# update-alternatives --install /usr/bin/pypy pypy /usr/bin/pypy3 30 && \
update-alternatives --install /usr/bin/node node /usr/bin/nodejs 30
## AtCoderでも使えるPythonライブラリをインストール
#RUN pip install numpy==1.18.2 && \
# pip install scipy==1.4.1 && \
# pip install scikit-learn==0.22.2.post1 && \
# pip install numba==0.48.0 && \
# pip install networkx==2.4
## Pythonでの競技プログラミング用データ構造をインストール
#RUN pip install git+https://github.com/hinamimi/ac-library-python && \
# pip install git+https://github.com/hinamimi/python-sortedcontainers
## C++でAtCoder Library(ACL)を使えるようにする
#RUN git clone https://github.com/atcoder/ac-library.git /lib/ac-library
#ENV CPLUS_INCLUDE_PATH /lib/ac-library
## # AHC用のRustのinstall
#RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
#ENV PATH $PATH:/home/root/.cargo/bin
ENV CONTEST_DIR $HOME/contest
WORKDIR $CONTEST_DIR
WORKDIR $HOME/lib