Skip to content

Commit

Permalink
first-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
westny committed May 2, 2024
1 parent 79b1150 commit 96ec3ab
Show file tree
Hide file tree
Showing 54 changed files with 5,417 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/apptainer-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Apptainer CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.1.2

- name: Clean disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get clean
- name: Build the Apptainer image
run: |
cd container
apptainer build dronalize.sif apptainer.def
- name: Download Data
run: |
wget -O synthD.zip "https://liuonline-my.sharepoint.com/:u:/g/personal/thewe60_liu_se/EfK1PKrQ3X9LgOd_8TSw1g0BINzDadmTxHF_RHKg_31dGw?e=SEKX9X&download=1"
unzip synthD.zip -d ./data
- name: Run PyTorch Training Loop
run: |
apptainer run container/dronalize.sif python train.py --config ci
37 changes: 37 additions & 0 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Conda CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: dronalize
environment-file: container/environment.yml
python-version: 3.11
auto-activate-base: false

- name: Download Data
run: |
wget -O synthD.zip "https://liuonline-my.sharepoint.com/:u:/g/personal/thewe60_liu_se/EfK1PKrQ3X9LgOd_8TSw1g0BINzDadmTxHF_RHKg_31dGw?e=SEKX9X&download=1"
unzip synthD.zip -d ./data
- name: Run PyTorch Training Loop
run: |
python train.py --config ci
- name: Run Unit Tests
run: |
python -m pip install pytest
pytest
31 changes: 31 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-22.04
env:
IMAGE_TAG: ${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
cd container
docker build -f Dockerfile . -t dronalize:${IMAGE_TAG}
- name: Download Data
run: |
wget -O synthD.zip "https://liuonline-my.sharepoint.com/:u:/g/personal/thewe60_liu_se/EfK1PKrQ3X9LgOd_8TSw1g0BINzDadmTxHF_RHKg_31dGw?e=SEKX9X&download=1"
unzip synthD.zip -d ./data
- name: Run PyTorch Training Loop
run: |
docker run -v "$(pwd)":/app -w /app dronalize:${IMAGE_TAG} python train.py --config ci
31 changes: 31 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Linting

on:
push:
branches: [ main ]
paths:
- '**.py'
pull_request:
branches: [ main ]
paths:
- '**.py'

jobs:
mypy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/workflows/requirements.txt
pip install mypy
- name: Run mypy
run: mypy --ignore-missing-imports .
13 changes: 13 additions & 0 deletions .github/workflows/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
torch
torchvision
torch_geometric
lightning
torchmetrics
pandas
scikit-learn
matplotlib
tqdm
utm
osmium
networkx
pytest
Loading

0 comments on commit 96ec3ab

Please sign in to comment.