Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl jq tar ca-

WORKDIR /tmp

RUN TAG=$(curl -fsSL https://api.github.com/repos/CCPBioSim/biosim-schema/releases/latest | jq -r .tag_name) && \
curl -fsSL -o artifacts.tar.gz \
"https://github.com/CCPBioSim/biosim-schema/releases/download/${TAG}/biosim-schema-artifacts.tar.gz" && \
RUN curl -fsSL -o artifacts.tar.gz \
"https://github.com/CCPBioSim/biosim-schema/releases/latest/download/biosim-schema-artifacts.tar.gz" && \
mkdir -p /opt/biosim-schema && \
tar -xzf artifacts.tar.gz -C /opt/biosim-schema

Expand Down Expand Up @@ -46,7 +45,7 @@ RUN pip install --upgrade pip
RUN pip install --no-cache-dir setuptools==84.2.1 gunicorn==27.0.1
# ensure latest version of biosim-extractor is installed in container
RUN pip install --no-cache-dir . && \
TAG=$(python3 -c "import json,urllib.request as u; print(json.load(u.urlopen('https://api.github.com/repos/CCPBioSim/biosim-extractor/releases/latest'))['tag_name'])") && \
TAG=$(python3 -c "from urllib.request import urlopen; u = urlopen('https://github.com/CCPBioSim/biosim-extractor/releases/latest').geturl(); prefix = 'https://github.com/CCPBioSim/biosim-extractor/releases/tag/'; assert u.startswith(prefix), f'Unexpected release URL: {u}'; print(u[len(prefix):])") && \
pip install --no-cache-dir --upgrade "https://github.com/CCPBioSim/biosim-extractor/archive/refs/tags/${TAG}.tar.gz"

# Stage 3: Runtime
Expand Down
Loading