Skip to content

Commit

Permalink
Revert "Merge branch 'master' into master"
Browse files Browse the repository at this point in the history
This reverts commit 75b026f, reversing
changes made to a5d2dc5.
  • Loading branch information
Roman Andriushchenko committed Sep 12, 2024
1 parent 75b026f commit ea8778c
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 129 deletions.
54 changes: 38 additions & 16 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build Deploy
# Builds and and deploys image of Paynt with additional dependencies to Dockerhub
name: Build Test
# Builds and tests paynt and deploys images to Dockerhub

on:
push:
Expand All @@ -19,27 +19,49 @@ env:
NR_JOBS: "2"

jobs:
deploy-learning:
name: Deploy on latest with learning dependencies (${{ matrix.buildType.name }})

deploy:
name: Deploy on latest (${{ matrix.buildType.name }})
runs-on: ubuntu-latest
strategy:
matrix:
buildType:
- {name: "Release", baseImageName : "randriu/paynt", imageName : "marisgg/paynt-learner", dockerTag: "latest", setupArgs: ""}
- {name: "Release", imageName : "randriu/paynt", dockerTag: "latest", setupArgs: ""}
fail-fast: false
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Build paynt image with learner dependencies
run: docker build -t ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} . -f Dockerfile --build-arg paynt_base=${{ matrix.buildType.baseImageName }}:${{ matrix.buildType.dockerTag }}
- name: Build paynt image from Dockerfile
run: docker build -t ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} . --build-arg setup_args=${{ matrix.buildType.setupArgs }} --build-arg setup_args_pycarl=${{ matrix.buildType.setupArgs }} --build-arg no_threads=${NR_JOBS}
- name: Login into docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Only login if using master on this forked repo
if: github.repository_owner == 'marisgg' && github.ref == 'refs/heads/master'
- name: Deploy paynt image with learner dependencies
# Only deploy if using master on this forked repo
if: github.repository_owner == 'marisgg' && github.ref == 'refs/heads/master'
# Only login if using master on original repo (and not for pull requests or forks)
if: github.repository_owner == 'randriu' && github.ref == 'refs/heads/master'
run: echo '${{ secrets.STORMPY_CI_DOCKER_PASSWORD }}' | docker login -u randriu --password-stdin
- name: Deploy paynt image
# Only deploy if using master on original repo (and not for pull requests or forks)
if: github.repository_owner == 'randriu' && github.ref == 'refs/heads/master'
run: docker push ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }}

# deploy-learning:
# name: Deploy on latest with learning dependencies (${{ matrix.buildType.name }})
# runs-on: ubuntu-latestx
# strategy:
# matrix:
# buildType:
# - {name: "Release", imageName : "randriu/paynt", dockerTag: "latest", setupArgs: ""}
# fail-fast: false
# steps:
# - name: Git clone
# uses: actions/checkout@v4
# - name: Build paynt image from Dockerfile
# run: docker build -t ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} . --build-arg setup_args=${{ matrix.buildType.setupArgs }} --build-arg setup_args_pycarl=${{ matrix.buildType.setupArgs }} --build-arg no_threads=${NR_JOBS}
# - name: Build paynt image with learner dependencies
# run: docker build -t ${{ matrix.buildType.imageName }}-learner:${{ matrix.buildType.dockerTag }} . -f paynt-learner.dockerfile --build-arg paynt_base=${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }}
# - name: Login into docker
# # Only login if using master on original repo (and not for pull requests or forks)
# if: github.repository_owner == 'randriu' && github.ref == 'refs/heads/master'
# run: echo '${{ secrets.STORMPY_CI_DOCKER_PASSWORD }}' | docker login -u randriu --password-stdin
# - name: Deploy paynt image with learner dependencies
# # Only deploy if using master on original repo (and not for pull requests or forks)
# if: github.repository_owner == 'randriu' && github.ref == 'refs/heads/master'
# run: docker push ${{ matrix.buildType.imageName }}-learner:${{ matrix.buildType.dockerTag }}
33 changes: 18 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
ARG paynt_base=randriu/paynt:ci
FROM movesrwth/stormpy:ci

# Pull paynt
FROM $paynt_base
# Additional arguments for compiling payntbind
ARG setup_args=""
# Number of threads to use for parallel compilation
ARG no_threads=2

WORKDIR /opt/learning
WORKDIR /opt/

# Install PyTorch and Jax with CUDA support.
RUN pip install torch==2.4.* "jax[cuda12]"
# install dependencies
RUN apt-get update -qq
RUN apt-get install -y graphviz
RUN pip install click z3-solver psutil graphviz

# Additional dependencies.
RUN pip install ipykernel joblib tensorboard==2.15.* einops==0.7.* gym==0.22.* pygame==2.5.* tqdm
# build paynt
WORKDIR /opt/paynt
COPY . .
WORKDIR /opt/paynt/payntbind
RUN python setup.py build_ext $setup_args -j $no_threads develop

RUN apt-get update && apt-get install -y curl
WORKDIR /opt/paynt

# install VS Code (code-server)
RUN curl -fsSL https://code-server.dev/install.sh | sh

# install VS Code extensions
RUN code-server --install-extension ms-python.python \
--install-extension ms-toolsai.jupyter
# (optional) install paynt
RUN pip install -e .
98 changes: 0 additions & 98 deletions paynt_pomdp_sketch.py

This file was deleted.

0 comments on commit ea8778c

Please sign in to comment.