4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

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

Posted at

勉強会向けに環境構築しようと思ったら、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

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?