Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix the cml simulation action #171

Merged
merged 4 commits into from
Aug 14, 2022
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions .github/workflows/cml-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
generate_cml_report:
if: github.event.label.name == 'run-simulation'
if: github.event.label.name == 'simulation'
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -20,6 +20,8 @@ jobs:

- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -61,4 +63,4 @@ jobs:
echo "# GCBM Model" > report.md
echo "## Total Biomass Curve" >> report.md
cml-publish tests/output/total_biomass_mt.png --md >> report.md
cml-send-comment report.md
cml-send-comment --pr report.md
16 changes: 12 additions & 4 deletions local/rest_api_gcbm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@ RUN pip install --no-cache-dir -r requirements.txt

# Adding npm for CML Actions
RUN apt-get update
RUN apt-get install nodejs npm -y

# Install NodeJS and npm
ENV NODE_VERSION=16.0.0
RUN apt install -y curl
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
ENV NVM_DIR=/root/.nvm
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"

# Install Python3
RUN apt-get install -y python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python
RUN python --version
RUN node --version
RUN npm --version

COPY . .

Expand Down