-
Notifications
You must be signed in to change notification settings - Fork 415
Expand file tree
/
Copy pathdockerfile
More file actions
46 lines (39 loc) · 1.83 KB
/
dockerfile
File metadata and controls
46 lines (39 loc) · 1.83 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
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Dockerfile for OpenFermion, Cirq, and select plugins.
FROM ubuntu:22.04
WORKDIR /root/workspace
COPY . /root/workspace
# Set PATH for miniforge
ENV PATH="/root/conda/bin:${PATH}"
RUN apt-get update && \
apt-get install -y --no-install-recommends git=1:2.34.1-1ubuntu1.15 \
wget=1.21.2-2ubuntu1.1 \
libblas-dev=3.10.0-2ubuntu1 \
liblapack-dev=3.10.0-2ubuntu1 \
# in order to verify github's certificate
ca-certificates=20240203~22.04.1 \
build-essential=12.9ubuntu3 && \
# delete the apt-get lists after the installation
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install miniforge https://github.com/conda-forge/miniforge?tab=readme-ov-file#as-part-of-a-ci-pipeline
RUN wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/download/25.3.1-0/Miniforge3-25.3.1-0-$(uname)-$(uname -m).sh" && \
bash Miniforge3.sh -b -p "${HOME}/conda" && \
rm Miniforge3.sh && \
conda init bash && \
# Create virtual env (fermion) with installing Psi4
conda create -n fermion psi4==1.10 python=3.12 -c conda-forge -y && \
# Install OpenFermion and plugins
conda install -n fermion -c conda-forge openfermion==1.7.1 openfermionpsi4==0.5 openfermionpyscf==0.5 -y
# Activate venv (fermion)
RUN echo "conda activate fermion" >> ~/.bashrc