Skip to content

Commit 5adba55

Browse files
authored
v7.2 release (#29)
* changes for v7.2 open source release
1 parent c7edfd7 commit 5adba55

File tree

528 files changed

+87339
-8542
lines changed

Some content is hidden

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

528 files changed

+87339
-8542
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM mcr.microsoft.com/devcontainers/cpp:1.0.4-debian-12
2+
# Install the xz-utils package
3+
RUN apt-get update && apt-get install -y xz-utils
4+
5+
RUN apt-get install npm -y && \
6+
npm install -g @bazel/bazelisk && \
7+
apt-get install libblas-dev -y && \
8+
apt-get install liblapack-dev -y
9+
10+
RUN apt-get install python3-minimal -y && \
11+
apt-get install python3-pandas python3-scipy python3-absl python3-pybind11 python3-protobuf awscli -y && \
12+
rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python

.devcontainer/devcontainer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/cpp:1.0.4-debian-12",
3+
"build": {
4+
// Path is relative to the devcontainer.json file
5+
"dockerfile": "Dockerfile"
6+
},
7+
}

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Exclude all unnecessary folders from docker
2+
docs/
3+
example/
4+
test/

.github/workflows/ci_process.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: ci-testing
2+
3+
# Controls when the workflow will run .
4+
on:
5+
# Triggers the workflow on pull request events for master
6+
pull_request:
7+
branches: [ master, dev ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Build the project
15+
run: make build_docker
16+
- name: Run the project
17+
run: |
18+
docker-compose up -d
19+
sleep 30
20+
- name: Run unit tests
21+
run: |
22+
set -o pipefail
23+
make test_lillymol | tee ./unit_test_results.txt
24+
- name: Stop running
25+
run: docker-compose down
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Docker
2+
3+
# This workflow uses actions that are not certified by GitHub.
4+
# They are provided by a third-party and are governed by
5+
# separate terms of service, privacy policy, and support
6+
# documentation.
7+
8+
on:
9+
push:
10+
branches: [ "master" ]
11+
12+
env:
13+
# Use docker.io for Docker Hub if empty
14+
REGISTRY: ghcr.io
15+
# github.repository as <account>/<repo>
16+
IMAGE_NAME: ${{ github.repository }}
17+
18+
19+
jobs:
20+
build:
21+
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
packages: write
26+
# This is used to complete the identity challenge
27+
# with sigstore/fulcio when running outside of PRs.
28+
id-token: write
29+
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v3
33+
34+
# Install the cosign tool except on PR
35+
# https://github.com/sigstore/cosign-installer
36+
- name: Install cosign
37+
if: github.event_name != 'pull_request'
38+
uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
39+
with:
40+
cosign-release: 'v1.11.0'
41+
42+
43+
# Workaround: https://github.com/docker/build-push-action/issues/461
44+
- name: Setup Docker buildx
45+
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
46+
47+
# Login against a Docker registry except on PR
48+
# https://github.com/docker/login-action
49+
- name: Log into registry ${{ env.REGISTRY }}
50+
if: github.event_name != 'pull_request'
51+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
52+
with:
53+
registry: ${{ env.REGISTRY }}
54+
username: ${{ github.actor }}
55+
password: ${{ secrets.GITHUB_TOKEN }}
56+
57+
# Extract metadata (tags, labels) for Docker
58+
# https://github.com/docker/metadata-action
59+
- name: Extract Docker metadata
60+
id: meta
61+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
62+
with:
63+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
64+
tags: |
65+
type=sha
66+
67+
# Build and push Docker image with Buildx (don't push on PR)
68+
# https://github.com/docker/build-push-action
69+
- name: Build and push Docker image
70+
id: build-and-push
71+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
72+
with:
73+
context: .
74+
push: ${{ github.event_name != 'pull_request' }}
75+
tags: ${{ steps.meta.outputs.tags }}
76+
labels: ${{ steps.meta.outputs.labels }}
77+
cache-from: type=gha
78+
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
1-
FROM gcc:13.2
1+
# builder stage
2+
FROM gcc:13.2 AS build
23

34
RUN apt-get update && \
45
apt-get upgrade -y
56

67
RUN apt-get install npm -y && \
7-
npm install -g @bazel/bazelisk
8-
9-
RUN apt-get install libblas-dev -y && \
8+
npm install -g @bazel/bazelisk && \
9+
apt-get install libblas-dev -y && \
1010
apt-get install liblapack-dev -y
1111

1212
RUN apt-get install python3-minimal -y && \
13-
apt-get install python3-pandas python3-scipy python3-absl python3-pybind11 python3-protobuf -y
14-
15-
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
13+
apt-get install python3-pandas python3-scipy python3-absl python3-pybind11 python3-protobuf -y && \
14+
rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
1615

1716
COPY . ./LillyMol
1817

18+
WORKDIR /LillyMol/src
19+
1920
ENV LILLYMOL_HOME=/LillyMol \
20-
BUILD_DIR=Linux
21+
BUILD_DIR=Linux \
22+
BUILD_BDB=1 \
23+
BUILD_PYTHON=1
2124

22-
# This step probably not necessary since now, third party
23-
# dependencies are all linked static. Maybe that will change.
24-
ENV LD_LIBRARY_PATH=/LillyMol/third_party/lib
25+
RUN ./update_bazel_configs.sh && ./build_third_party.sh && ./build_from_src.sh
2526

26-
WORKDIR /LillyMol/src
27+
# final stage
28+
FROM ubuntu:mantic AS final
29+
30+
RUN apt-get update && \
31+
apt-get upgrade -y && \
32+
apt-get install python3-minimal -y && \
33+
apt-get install python3-pandas python3-scipy python3-absl python3-pybind11 python3-protobuf -y && \
34+
rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
2735

28-
ENV BUILD_BDB=1
29-
ENV BUILD_PYTHON=1
36+
COPY --from=build /LillyMol /LillyMol
3037

31-
RUN ./build_third_party.sh
32-
RUN ./build_from_src.sh
38+
ENV LILLYMOL_HOME=/LillyMol \
39+
BUILD_DIR=Linux
3340

3441
WORKDIR /LillyMol

Makefile

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,45 @@
2222
default:
2323
bash -c 'if [[ -z "$$(type -p bazelisk)" && -z "$$(type -p bazel)" ]] ; then echo "No bazel/bazelisk, see README.md" && exit 1 ; fi'
2424
echo "Default build does not build targets 'berkeleydb' and 'python'"
25+
cd src && ./update_bazel_configs.sh
2526
cd src && ./build_third_party.sh
2627
cd src && ./build_from_src.sh
2728

2829
all:
2930
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
31+
cd src && BUILD_BDB=1 BUILD_PYTHON=1 BUILD_VENDOR=1 ./update_bazel_configs.sh
32+
cd src && BUILD_BDB=1 BUILD_PYTHON=1 BUILD_VENDOR=1 ./build_third_party.sh
33+
cd src && BUILD_BDB=1 BUILD_PYTHON=1 BUILD_VENDOR=1 ./build_from_src.sh
3234

3335
berkeleydb:
3436
bash -c 'if [[ -z "$$(type -p bazelisk)" && -z "$$(type -p bazel)" ]] ; then echo "No bazel/bazelisk, see README.md" && exit 1 ; fi'
37+
cd src && BUILD_BDB=1 BUILD_PYTHON=1 BUILD_VENDOR=1 ./update_bazel_configs.sh
3538
cd src && BUILD_BDB=1 ./build_third_party.sh
3639
cd src && BUILD_BDB=1 ./build_from_src.sh
3740

3841
python:
3942
bash -c 'if [[ -z "$$(type -p bazelisk)" && -z "$$(type -p bazel)" ]] ; then echo "No bazel/bazelisk, see README.md" && exit 1 ; fi'
43+
cd src && BUILD_BDB=1 BUILD_PYTHON=1 BUILD_VENDOR=1 ./update_bazel_configs.sh
4044
cd src && BUILD_PYTHON=1 ./build_third_party.sh
4145
cd src && BUILD_PYTHON=1 ./build_from_src.sh
4246

47+
vendor:
48+
bash -c 'if [[ -z "$$(type -p bazelisk)" && -z "$$(type -p bazel)" ]] ; then echo "No bazel/bazelisk, see README.md" && exit 1 ; fi'
49+
cd src && BUILD_BDB=1 BUILD_PYTHON=1 BUILD_VENDOR=1 ./update_bazel_configs.sh
50+
cd src && BUILD_VENDOR=1 ./build_third_party.sh
51+
cd src && BUILD_VENDOR=1 ./build_from_src.sh
52+
4353
build_docker:
44-
docker build -f Dockerfile -t lillymol .
54+
docker build -f Dockerfile -t lillymolprivate .
4555

4656
test_lillymol:
57+
docker container exec lilly_mol bash -c 'cd bin/Linux/ && echo "Number of executables built: `ls -1 | wc -l`" && ls -1'
4758
docker container exec lilly_mol bash -c "cd test/ && ./run_all_test.sh"
4859
docker container exec lilly_mol bash -c "cd src/ && ./run_python_unit_tests.sh 2>&1"
60+
61+
start_s3:
62+
docker-compose up -d
63+
sleep 30
64+
echo 'run s3 commannd with: aws s3 --endpoint "http://localhost:4566" <s3 command>'
65+
stop_s3:
66+
docker-compose down

README.md

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Welcome to the Eli Lilly LillyMol implementation.
22

3-
![Static Badge](https://img.shields.io/badge/tested_docker_gcc_version-10.2%7C12.3%7C13.2-blue)
4-
![Static Badge](https://img.shields.io/badge/supported_platform-Linux-green)
5-
63
## Background
74
LillyMol is a C++ library for Cheminformatics. This repo also contains a variety of useful
85
command line tools that have been built with LillyMol.
@@ -75,6 +72,14 @@ module load gcc10
7572
module load bazelisk
7673
module load git
7774
```
75+
76+
Other system components that are needed, which may or may not be
77+
available.
78+
79+
* wget
80+
* unzip
81+
* libz-dev
82+
7883
### Python
7984
If you wish to build the python bindings, you will need a recent version of
8085
python. Development was done with python3.11 and has not been
@@ -89,11 +94,15 @@ Note that with the default build (below) Python bindings are not built.
8994
If you have bazelisk and gcc installed, there is a reasonable possibility that
9095
issuing `make` in the top level directory will work (but see note below
9196
about NFS filesystems).
97+
9298
```
93-
cd /path/to/Lillymol
99+
# Inside Lilly use the private repo
100+
git clone https://github.com/EliLillyCo/LillyMol
101+
102+
cd /path/to/LillyMol
94103
make
95104
```
96-
Executables will be in bin/$(uname) and libraries in lib. More details
105+
Executables will be in `bin/$(uname)` and libraries in `lib`. More details
97106
below. There is no concept of installation prefix, everything remains
98107
in the repo.
99108

@@ -103,10 +112,36 @@ are built. If you wish to build either of those
103112
make python
104113
make berkeleydb
105114
```
115+
or
116+
```
117+
make all
118+
```
119+
120+
If you look at [Makefile](Makefile) you will see that all it is doing
121+
is sequentially invoking the three scripts discussed below, possibly with
122+
123+
### Configuring for bazel
124+
Within the src directory, the file `WORKSPACE` configures the build environment
125+
for `bazel`. If you are building python bindings, this file needs to be updated
126+
to reflect the location of your local python. The script `update_bazel_configs.sh`
127+
does this automatically from the Makefile.
106128

107-
If you look at (Makefile)[Makefile] you will see that all it is doing
108-
is sequentially invoking the two scripts discussed below, possibly with
109-
various shell variables set, which enable the optional builds.
129+
### Installation Directory
130+
There is an 'install' target in the BUILD files, and defined in
131+
[build_deps/install.bzl](src/build_deps/install.bzl).
132+
This is where LillyMol executables will be installed when
133+
the 'install' run target is run. Again `update_bazel_configs.sh`
134+
will update this to '/path/to/LillyMol/bin/$(uname)'.
135+
Check to see that the update has
136+
been done correctly and adjust if not, or to set another location.
137+
138+
```
139+
tail build_deps/install.bzl
140+
```
141+
That file contains other mechanisms for specifying the install directory.
142+
But remember, every time `make` is run, that file will be automatically
143+
updated again. Remove the calls to `update_bazel_configs.sh` from
144+
the Makefile if needed.
110145

111146
### C++ Dependencies.
112147
There are several dependencies which could be installed on the system,
@@ -134,12 +169,9 @@ directory (next to src) and then download, build and install the following depen
134169

135170
- **BerkeleyDb**: used for key/value databases
136171
- **f2c/libf2c**: there is some fortran in LillyMol.
137-
- **HighwayHash**: hash function from Google
138172

139173
Running 'build_third_party.sh' needs to be done once.
140174

141-
Currently HighwayHash is impeding deployment on Mac's.
142-
143175
Note that BerkeleyDB and Python bindings are only built if requested.
144176
In [Makefile](/Makefile) you will see use of the shell variables
145177
'BUILD_PYTHON' and 'BUILD_BDB' which if set, enables building of
@@ -152,39 +184,15 @@ re-run the script and all dependencies are downloaded and rebuilt. If there is
152184
an individual dependency that you would like to rebuild, just remove it from
153185
the `third_party` directory, run the script again and it will be rebuilt.
154186

155-
Note that [.bazelrc](/src/.bazelrc) contains a hardware restriction to quite old
156-
Intel hardware. You should update update `--cxxopt` to reflect
157-
your hardware. Using `--cxxopt=-march=native --cxxopt=-mtune=native` is likely
158-
what you want. Build for the local hardware.
159-
160-
`WORKSPACE` configures the build environment for `bazel`. The path
161-
to the external dependencies must be configured in that file. They
162-
can be either full path names, or path names relative to the main
163-
WORKSPACE file. In the WORKSPACE file in this distribution, there is a mixture, with
164-
many of the dependencies in the `../third_party` directory, and
165-
others with Lilly specific full path names. You may need to
166-
update WORKSPACE for local needs.
167-
168-
Note that installing these external dependencies and running bazel may require
187+
Note too that installing these external dependencies and running bazel may require
169188
considerable amounts of disk space. For example at the time of writing my
170189
'third_party' directory contains 1.2GB and my bazel temporary area contains 2.2GB.
171190

172-
### Installation Directory
173-
There is an 'install' target in the BUILD files, and defined in
174-
[build_deps/install.bzl](src/build_deps/install.bzl).
175-
This is where LillyMol executables will be installed when
176-
the 'install' run target is run.
177191

178-
'build_third_party.sh' changes the default location for executables
179-
to be '/path/to/LillyMol/bin/$(uname)'. Check to see that the update has
180-
been done correctly and adjust if not, or to set another location.
181-
182-
```
183-
tail build_deps/install.bzl
184-
```
185-
That file contains other mechanisms for specifying the install directory.
186-
But remember, every time `build_third_party.sh` runs it will change
187-
this file.
192+
Note that [.bazelrc](/src/.bazelrc) contains a hardware restriction to quite old
193+
Intel hardware. You should update update `--cxxopt` to reflect
194+
your hardware. Using `--cxxopt=-march=native --cxxopt=-mtune=native` is likely
195+
what you want. Build for the local hardware.
188196

189197
### Python Bindings
190198
During building of external dependencies (with build_third_party.sh

0 commit comments

Comments
 (0)