generated from HephaestusProject/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.Dockerfile
52 lines (41 loc) · 1.62 KB
/
dev.Dockerfile
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
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
MAINTAINER bsk0130@gmail.com
RUN apt-get update && \
apt-get install -y sudo apt-utils make build-essential \
libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
libsqlite3-dev wget curl git libffi-dev liblzma-dev locales \
g++ openjdk-8-jdk openssh-server
RUN locale-gen en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ARG UID
RUN adduser --disabled-password --gecos "" user --uid ${UID:-1000}
RUN adduser user sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER user
WORKDIR /home/user
# pyenv 설치/ 설정
ENV HOME /home/user
ENV PYENV_ROOT $HOME/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN git clone https://github.com/pyenv/pyenv.git .pyenv
# python 설치
RUN pyenv install 3.7.9 && \
pyenv global 3.7.9 && \
pyenv rehash && \
pip install --no-cache-dir --upgrade pip setuptools wheel
SHELL ["/bin/bash", "-c"]
RUN pip install --no-cache-dir konlpy
RUN bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh)
RUN pip install --no-cache-dir torch pytorch-lightning mxnet gluonnlp omegaconf pytest pandas scikit-learn
# WORKDIR 설정
WORKDIR /home/user/workspace
# openssh-server 설정
ARG PASSWD
RUN echo user:${PASSWD:-hephaestus} | sudo chpasswd
RUN sudo sed -i 's_/usr/lib/openssh/sftp-server_internal-sftp_g' /etc/ssh/sshd_config
RUN echo "sudo service ssh start" > /home/user/.bashrc
# pyenv 추가 설정
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
RUN echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc