Skip to content

Commit

Permalink
updated builders
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Mar 6, 2024
1 parent 4861061 commit e907022
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 31 deletions.
8 changes: 6 additions & 2 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 15 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# TODO: Use a more specific tag instead of latest for reproducibility
FROM ubuntu:latest

ENV DEBIAN_FRONTEND=noninteractive \
XVFB_RES="1920x1080x24" \
XVFB_ARGS="" \
PATH="/app/.venv/bin:$PATH" \
CONFIG_ENV_FILE="/app/config/config.env" \
SECRET_ENV_FILE="/app/secret/secret.env" \
STORAGE_GCS_CREDENTIALS_FILE="/app/secret/gcs_credentials.json" \
STORAGE_LOCAL_CACHE_DIR="/app/scratch"
ENV DEBIAN_FRONTEND=noninteractive
# XVFB_RES="1920x1080x24" \
# XVFB_ARGS="" \
# PATH="/app/.venv/bin:$PATH" \
# CONFIG_ENV_FILE="/app/config/config.env" \
# SECRET_ENV_FILE="/app/secret/secret.env" \
# STORAGE_GCS_CREDENTIALS_FILE="/app/secret/gcs_credentials.json" \
# STORAGE_LOCAL_CACHE_DIR="/app/scratch"

WORKDIR /app

# copy and make dirs
COPY ./biosimulator_processes /app/biosimulator_processes
# COPY ./biosimulator_processes /app/biosimulator_processes
COPY ./notebooks /app/notebooks

# copy files
COPY ./pyproject.toml ./poetry.lock ./data ./scripts/trust-notebooks.sh /app/
COPY ./scripts/xvfb-startup.sh /xvfb-startup.sh
# COPY ./scripts/xvfb-startup.sh /xvfb-startup.sh

VOLUME /app/data

Expand All @@ -43,20 +43,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libice6 \
libpython3.10 \
wget \
xvfb \
&& mkdir /tmp/.X11-unix \
&& chmod 1777 /tmp/.X11-unix \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --upgrade pip && pip install poetry \
&& poetry config virtualenvs.in-project true \
# && poetry run pip install psutil \
&& poetry update \
&& poetry install \
&& chmod +x ./trust-notebooks.sh \
&& ./trust-notebooks.sh \
&& rm ./trust-notebooks.sh
&& rm ./trust-notebooks.sh \
&& apt-get install --reinstall -y ca-certificates python3-pip \
&& apt-get clean \
&& apt-get autoclean

CMD ["poetry", "run", "jupyter", "lab", "--port=8888", "--no-browser", "--allow-root"]
# CMD ["poetry", "run", "jupyter", "lab", "--port=8888", "--no-browser", "--allow-root"]


# PLEASE NOTE: We do not need to add a USER in the Dockerfile as Singularity will handle
Expand Down
18 changes: 9 additions & 9 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions process-bigraph
Submodule process-bigraph added at 975b59
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "biosimulator-processes"
version = "0.0.17"
version = "0.0.18"
description = "Core implementations of process-bigraph.composite.Process aligning with BioSimulators simulator tools."
authors = ["Alex Patrie <[email protected]>"]
readme = "README.md"
Expand Down
12 changes: 12 additions & 0 deletions scripts/exec-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

version="$1"

if [ "${version}" == "" ]; then
echo "Please enter the version you would like to run as a runtime arg. Exiting."
exit 1
fi

docker exec \
-it biosimulator-processes-container \
sh -c "poetry run jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root"
7 changes: 6 additions & 1 deletion scripts/run-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ if [ "${version}" == "" ]; then
exit 1
fi

docker run --platform linux/amd64 -it -p 8888:8888 ghcr.io/biosimulators/biosimulator-processes:"${version}"
docker run -d \
--platform linux/amd64 \
-p 8888:8888 \
--name biosimulator-processes-container \
ghcr.io/biosimulators/biosimulator-processes:"${version}" \
sh -c "poetry run jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup, find_packages


__version__ = "0.0.17"
__version__ = "0.0.18"

with open("README.md", "r") as readme:
description = readme.read()
Expand Down Expand Up @@ -43,7 +43,7 @@
python_requires=">=3.10",
install_requires=[
"bigraph-schema",
"process-bigraph",
# "process-bigraph",
"bigraph-builder",
"numpy",
"pytest>=6.2.5",
Expand Down

0 comments on commit e907022

Please sign in to comment.