1
Help us understand the problem. What are the problem?

posted at

RDKitやPsi4をインストールするDockerfileを作った

勉強会向けに環境構築しようと思ったら、WindowではいくつかRDKitの機能が使えなかった。
それなら「DockerならLinuxっぽいしいけるやろ」と思って色々突っ込んでみました(重い……)

こちらを参考にして、必要なもの、いらないものを調整しました。
https://punhundon-lifeshift.com/dockerfile

FROM ubuntu:latest
#https://punhundon-lifeshift.com/dockerfile

# proxy
#ENV http_proxy http://doraemon:1a2b3c@111.111.111.111:8080
#ENV https_proxy https://doraemon:1a2b3c@111.111.111.111:8080

# install linux commands
RUN apt-get -y update && apt-get install -y \
sudo \
wget \
vim \
curl \
unzip

# add Japanese packages to ubuntu
RUN apt-get install -y language-pack-ja-base language-pack-ja \
fontconfig fonts-takao && locale-gen ja_JP.UTF-8
ENV LANG ja_JP.UTF-8
ENV LANGUAGE ja_JP:ja
ENV LC_ALL ja_JP.UTF-8

# install miniconda3-py3.6
WORKDIR /opt
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh && \
sh /opt/Miniconda3-4.5.4-Linux-x86_64.sh -b -p /opt/miniconda3 && \
rm -f Miniconda3-4.5.4-Linux-x86_64.sh

# set path
ENV PATH /opt/miniconda3/bin:$PATH

# install libraries
RUN pip install --upgrade pip && \
conda update -n base conda && \
apt-get -y install openbabel && \
conda install psi4 psi4-rt python=3.7 -c psi4 && \
conda install -c conda-forge rdkit && \
pip install openfermion && \
pip install py3Dmol && \
pip install pubchempy && \
conda install -c conda-forge nodejs jupyterlab

# make 'work' directory
WORKDIR /
RUN mkdir /work

CMD ["bash","-c","jupyter notebook --notebook-dir=/data --ip=0.0.0.0 --port=8889 --no-browser --allow-root"]

ビルド
docker build -t test-phi4 .\phi4-docker

Dockerの実行
docker run -v ${pwd}/Anaconda:/data --rm -p 8888:8888 -p 8889:8889 --name test-phi4 -it test-phi4

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
1
Help us understand the problem. What are the problem?