Skip to content

Commit

Permalink
Merge pull request #75 from UM-Bridge/CI-fix
Browse files Browse the repository at this point in the history
Revert achlys image and update gs2 model
  • Loading branch information
chun9l authored May 18, 2024
2 parents 41ed2c0 + f0b20e0 commit 6b498ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions models/achlys/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM achlys-ubuntu
FROM linusseelinger/achlys-ubuntu

RUN apt update && apt install -y inotify-tools && \
rm -rf /var/lib/apt/lists/*

RUN apt install -y python3-pip python3-venv && \
RUN apt install -y python3-pip python3-virtualenv && \
python3 -m venv venv && \
. venv/bin/activate && \
pip install umbridge
Expand Down
8 changes: 6 additions & 2 deletions models/gs2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ RUN echo 'alias pip=pip3' >> $HOME/.bashrc

RUN echo 'export GK_SYSTEM=gnu_ubuntu' >> $HOME/.bashrc

RUN pip install ford netCDF4==1.6.2
RUN python -m venv venv && . venv/bin/activate && \
pip install ford netCDF4==1.6.2 umbridge pyrokinetics

RUN git clone https://[email protected]/gyrokinetics/gs2.git /usr/gs2

Expand All @@ -51,5 +52,8 @@ RUN echo ${GK_SYSTEM}
RUN make -IMakefiles depend

RUN make -IMakefiles gs2

#RUN make -IMakefiles tests

COPY server.py fast.in .

CMD . venv/bin/activate && python server.py
3 changes: 1 addition & 2 deletions models/gs2/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import csv
from pyrokinetics import Pyro
import numpy as np
from datetime import datetime
from fileinput import FileInput

Expand All @@ -21,7 +20,7 @@ def get_output_sizes(self, config):

def __call__(self, parameters, config):
input_file = "fast.in" # Select input file
os.system("mkdir restart") # GS2 needs this folder otherwise will fail
os.system("mkdir -p restart") # GS2 needs this folder otherwise will fail
with FileInput(files=input_file, inplace=True) as file:
checkpoint = 0
for line in file:
Expand Down

0 comments on commit 6b498ca

Please sign in to comment.