Skip to content

Commit

Permalink
commit script and dockerfile that works
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelML committed Aug 23, 2024
1 parent abe5862 commit 6c57030
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ARG BOOST_MAJOR_VERSION="1"
ARG BOOST_MINOR_VERSION="84"
ARG BOOST_PATCH_VERSION="0"

FROM --platform=linux/amd64 debian:bookworm as build-stage
FROM debian:bookworm as build-stage
ARG RDKIT_GIT_URL
ARG RDKIT_BRANCH
ARG EMSDK_VERSION
Expand All @@ -39,11 +39,12 @@ LABEL maintainer="Greg Landrum <[email protected]>"
RUN apt-get update && apt-get upgrade -y && apt install -y \
curl \
wget \
cmake/buster-backports \
cmake \
python3 \
g++ \
libeigen3-dev \
git \
xz-utils \
nodejs

ENV LANG C
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rdkit/rdkit",
"version": "2023.9.2-1.0.0",
"private": true,
"version": "2024.3.5-1.0.0",
"private": false,
"description": "JavaScript distribution of cheminformatics functionality from the RDKit - a C++ library for cheminformatics.",
"main": "dist/RDKit_minimal.js",
"types": "dist/index.d.ts",
Expand Down
21 changes: 19 additions & 2 deletions scripts/build_rdkitjs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,27 @@ mkdir -p $MINIMALLIB_OUTPUT_PATH
# legacy minimallib output path
LEGACY_MINIMALLIB_OUTPUT_PATH="Code/MinimalLib/dist"
rm -rf $LEGACY_MINIMALLIB_OUTPUT_PATH
mkdir -p $LEGACY_MINIMALLIB_OUTPUT_PATH
mkdir -p $LEGACY_MINIMALLIB_OUTPUT_PATH

# Build distribution files
DOCKER_BUILDKIT=1 docker build --no-cache -f Dockerfile --build-arg RDKIT_BRANCH=$RDKIT_BRANCH -o $MINIMALLIB_OUTPUT_PATH .
DOCKER_BUILDKIT=1 docker build --no-cache --platform=linux/amd64 -f Dockerfile --build-arg RDKIT_BRANCH=$RDKIT_BRANCH -o $MINIMALLIB_OUTPUT_PATH .

# Make dist files executable
chmod a+rwx $MINIMALLIB_OUTPUT_PATH/RDKit_minimal.js
chmod a+rwx $MINIMALLIB_OUTPUT_PATH/RDKit_minimal.wasm

# Add a copy of the distribution files at the original rdkit location
# for backwards compatibility
cp $MINIMALLIB_OUTPUT_PATH/RDKit_minimal.js $LEGACY_MINIMALLIB_OUTPUT_PATH/RDKit_minimal.js
cp $MINIMALLIB_OUTPUT_PATH/RDKit_minimal.wasm $LEGACY_MINIMALLIB_OUTPUT_PATH/RDKit_minimal.wasm

# Move docs file in dist folder for demos to work properly
cp docs/demo.html $MINIMALLIB_OUTPUT_PATH/demo.html
cp docs/GettingStartedInJS.html $MINIMALLIB_OUTPUT_PATH/GettingStartedInJS.html

# Log build completed
echo "Build completed"
echo "MinimalLib distribution files are at $MINIMALLIB_OUTPUT_PATH"

# Make dist files executable
chmod a+rwx $MINIMALLIB_OUTPUT_PATH/RDKit_minimal.js
Expand Down
8 changes: 8 additions & 0 deletions scripts/ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set -e

# Set branch to release
RDKIT_BRANCH="$RDKIT_BRANCH"
MINIMALLIB_OUTPUT_PATH="dist"

# Build distribution files
DOCKER_BUILDKIT=1 docker build --no-cache --platform=linux/amd64 -f Dockerfile --build-arg RDKIT_BRANCH=$RDKIT_BRANCH -o $MINIMALLIB_OUTPUT_PATH .

0 comments on commit 6c57030

Please sign in to comment.