Skip to content

Commit 2dc65c0

Browse files
authored
Update build process for LillyMol 7.0 (#25)
1 parent 9f37473 commit 2dc65c0

File tree

1,766 files changed

+8851
-5144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,766 files changed

+8851
-5144
lines changed

Dockerfile

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,34 @@
1-
FROM gcc:10.2
1+
FROM gcc:13.2
22

3-
ENV LILLYMOL_HOME=/LillyMol \
4-
BUILD_DIR=Linux
5-
6-
# Install Eigen
7-
# (No need to install zlib since zlib1g and zlib1g-dev are alreday in the gcc base image)
83
RUN apt-get update && \
9-
apt-get upgrade -y && \
10-
apt-get install -y libeigen3-dev && \
11-
cd /usr/include && \
12-
ln -sf eigen3/Eigen Eigen
4+
apt-get upgrade -y
135

146
RUN apt-get install npm -y && \
15-
npm install -g @bazel/bazelisk && \
16-
apt-get install cmake -y
17-
18-
RUN apt-get install python3-pip -y && \
19-
pip3 install pandas && \
20-
apt-get install libblas-dev -y && \
21-
apt-get install liblapack-dev -y && \
22-
pip3 install scipy
23-
24-
COPY . ./LillyMol
25-
26-
WORKDIR /LillyMol
7+
npm install -g @bazel/bazelisk
278

28-
RUN mkdir bin && \
29-
mkdir bin/Linux && \
30-
cd src && \
31-
./build_third_party.sh
32-
33-
WORKDIR /LillyMol/src
9+
RUN apt-get install libblas-dev -y && \
10+
apt-get install liblapack-dev -y
3411

35-
RUN cp /tmp/WORKSPACE .
12+
RUN apt-get install python3-minimal -y && \
13+
apt-get install python3-pandas python3-scipy python3-absl python3-pybind11 python3-protobuf -y
3614

37-
WORKDIR /LillyMol/src/build_deps
15+
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
3816

39-
RUN sed -i 's/\/workspaces\/LillyMolPrivate\/bin\/Linux\//\/LillyMol\/bin\/Linux\//g' install.bzl
17+
COPY . ./LillyMol
4018

41-
WORKDIR /LillyMol
19+
ENV LILLYMOL_HOME=/LillyMol \
20+
BUILD_DIR=Linux
4221

22+
# This step probably not necessary since now, third party
23+
# dependencies are all linked static. Maybe that will change.
4324
ENV LD_LIBRARY_PATH=/LillyMol/third_party/lib
4425

45-
RUN mkdir /node && \
46-
mkdir /node/scratch
47-
4826
WORKDIR /LillyMol/src
4927

28+
ENV BUILD_BDB=1
29+
ENV BUILD_PYTHON=1
30+
31+
RUN ./build_third_party.sh
5032
RUN ./build_from_src.sh
5133

5234
WORKDIR /LillyMol
53-
54-
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
55-
56-
# RUN apt-get install python3-pip -Y

Makefile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright 2018 Eli Lilly and Company
2+
#
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
########################################################################
16+
17+
.PHONY: default
18+
.PHONY: all
19+
20+
# A default target that will probably work in most cases.
21+
# Note it does not build BerkeleyDB dependent tools or Python bindings.
22+
default:
23+
bash -c 'if [[ -z "$$(type -p bazelisk)" && -z "$$(type -p bazel)" ]] ; then echo "No bazel/bazelisk, see README.md" && exit 1 ; fi'
24+
echo "Default build does not build targets 'berkeleydb' and 'python'"
25+
cd src && ./build_third_party.sh
26+
cd src && ./build_from_src.sh
27+
28+
all:
29+
bash -c 'if [[ -z "$$(type -p bazelisk)" && -z "$$(type -p bazel)" ]] ; then echo "No bazel/bazelisk, see README.md" && exit 1 ; fi'
30+
cd src && BUILD_BDB=1 BUILD_PYTHON=1 ./build_third_party.sh
31+
cd src && BUILD_BDB=1 BUILD_PYTHON=1 ./build_from_src.sh
32+
33+
berkeleydb:
34+
bash -c 'if [[ -z "$$(type -p bazelisk)" && -z "$$(type -p bazel)" ]] ; then echo "No bazel/bazelisk, see README.md" && exit 1 ; fi'
35+
cd src && BUILD_BDB=1 ./build_third_party.sh
36+
cd src && BUILD_BDB=1 ./build_from_src.sh
37+
38+
python:
39+
bash -c 'if [[ -z "$$(type -p bazelisk)" && -z "$$(type -p bazel)" ]] ; then echo "No bazel/bazelisk, see README.md" && exit 1 ; fi'
40+
cd src && BUILD_PYTHON=1 ./build_third_party.sh
41+
cd src && BUILD_PYTHON=1 ./build_from_src.sh
42+
43+
build_docker:
44+
docker build -f Dockerfile -t lillymol .
45+
46+
test_lillymol:
47+
docker container exec lilly_mol bash -c "cd test/ && ./run_all_test.sh"
48+
docker container exec lilly_mol bash -c "cd src/ && ./run_python_unit_tests.sh 2>&1"

0 commit comments

Comments
 (0)