-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: added polling for PySCeS release to PyPI, updated Dockerfile t…
…o install PySCeS from PyPI
- Loading branch information
Showing
5 changed files
with
50 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,16 @@ jobs: | |
############################################# | ||
## Update the version of the simulator | ||
############################################# | ||
- name: Check that the version of the simulator is available from PyPI | ||
if: github.event.inputs.simulatorVersion | ||
uses: emilioschepis/[email protected] | ||
with: | ||
url: https://pypi.org/pypi/pysces/${{ github.event.inputs.simulatorVersion }}/json | ||
method: GET | ||
expected-status: 200 | ||
timeout: 3600000 # 1 hr | ||
interval: 60000 # 1 min | ||
|
||
- name: Update the version of the simulator | ||
if: github.event.inputs.simulatorVersion | ||
run: | | ||
|
@@ -127,17 +137,26 @@ jobs: | |
python -m pip install git+https://github.com/modelon-community/Assimulo.git@Assimulo-${ASSIMULO_VERSION} | ||
- name: Install PySCeS | ||
env: | ||
PYSCES_REVISION: 470cd0b8afa4c14721a2b2bc00d4c71d80603801 | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y --no-install-recommends \ | ||
git \ | ||
gcc \ | ||
gfortran \ | ||
libgfortran5 | ||
python -m pip install git+https://github.com/PySCeS/pysces.git@${PYSCES_REVISION} | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 20 | ||
retry_on: error | ||
retry_wait_seconds: 300 | ||
max_attempts: 4 | ||
command: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y --no-install-recommends jq | ||
SIMULATOR_VERSION=$(jq -r '.version' biosimulators.json) | ||
sudo apt-get update -y | ||
sudo apt-get install -y --no-install-recommends \ | ||
git \ | ||
gcc \ | ||
gfortran \ | ||
libgfortran5 | ||
python -m pip install "pysces==${SIMULATOR_VERSION}" | ||
# install package | ||
- name: Install the package | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Base OS | ||
FROM ghcr.io/biosimulators/biosimulators_pysces/pysces_base:latest | ||
|
||
ARG VERSION=0.1.21 | ||
ARG VERSION=0.1.22 | ||
ARG SIMULATOR_VERSION="1.0.0" | ||
|
||
# metadata | ||
|
@@ -29,6 +29,23 @@ LABEL \ | |
extra.identifiers.biotools="pysces" \ | ||
maintainer="BioSimulators Team <[email protected]>" | ||
|
||
# install PySCeS | ||
RUN apt-get update -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
git \ | ||
gcc \ | ||
gfortran \ | ||
libgfortran5 \ | ||
\ | ||
&& pip install "pysces[all]==${SIMULATOR_VERSION}" \ | ||
\ | ||
&& apt-get remove -y \ | ||
git \ | ||
gcc \ | ||
gfortran \ | ||
&& apt-get autoremove -y \ | ||
&& rm -rf /var/lib/apt/lists | ||
|
||
# Copy code for command-line interface into image and install it | ||
COPY . /root/Biosimulators_PySCeS | ||
RUN pip install /root/Biosimulators_PySCeS \ | ||
|
@@ -40,7 +57,6 @@ RUN pip install /root/Biosimulators_PySCeS \ | |
&& cp /root/Biosimulators_PySCeS/.pys_usercfg.Dockerfile.ini /Pysces/.pys_usercfg.ini \ | ||
&& cp /root/Biosimulators_PySCeS/.pys_usercfg.Dockerfile.ini /root/Pysces/.pys_usercfg.ini \ | ||
&& rm -rf /root/Biosimulators_PySCeS | ||
RUN pip install "pysces==${SIMULATOR_VERSION}" | ||
|
||
# supported environment variables | ||
ENV ALGORITHM_SUBSTITUTION_POLICY=SIMILAR_VARIABLES \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.1.21' | ||
__version__ = '0.1.22' |