-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from martius-lab/fkloss/hockey-game-req
Provide Apptainer images for comprl and comprl-web-reflex + some fixes
- Loading branch information
Showing
31 changed files
with
145 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
bootstrap: docker | ||
from: ubuntu:24.04 | ||
|
||
%arguments | ||
COMPRL_GIT_BRANCH=main | ||
|
||
%post | ||
set -e | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
echo "deb http://archive.ubuntu.com/ubuntu noble universe" >> /etc/apt/sources.list | ||
apt-get update | ||
|
||
apt-get install -y python3-dev python3-pip python3-full swig git | ||
|
||
git clone https://github.com/martius-lab/teamproject-competition-server --depth 1 -b "{{ COMPRL_GIT_BRANCH }}" /comprl | ||
|
||
python3 -m venv /venv | ||
. /venv/bin/activate | ||
|
||
pip install /comprl/comprl | ||
pip install -r /comprl/comprl-hockey-game/requirements.txt | ||
|
||
|
||
# cleanup | ||
apt-get clean | ||
pip cache purge | ||
|
||
|
||
%runscript | ||
. /venv/bin/activate | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
comprl | ||
numpy | ||
hockey @ git+https://[email protected]/martius-lab/laser-hockey-env.git@cc48daa135e2cca3e620b90431e57870f61d043c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Container to run comprl-web-reflex. Based on | ||
# https://github.com/reflex-dev/reflex/tree/main/docker-example/simple-two-port | ||
|
||
bootstrap: docker | ||
from: python:3.12 | ||
|
||
%arguments | ||
COMPRL_GIT_BRANCH=main | ||
|
||
%post | ||
set -e | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get update | ||
apt-get install -y git caddy redis-server | ||
|
||
git clone https://github.com/martius-lab/teamproject-competition-server --depth 1 -b "{{ COMPRL_GIT_BRANCH }}" /comprl | ||
|
||
python3 -m venv /venv | ||
. /venv/bin/activate | ||
|
||
pip install /comprl/comprl | ||
pip install -r /comprl/comprl-web-reflex/requirements.txt | ||
|
||
mkdir /comprl-config | ||
|
||
# set up reflex | ||
cd /comprl/comprl-web-reflex | ||
|
||
# database path and registration key must be set (and db file must exist), | ||
# otherwise `reflex export` will fail. However, the database doesn't need | ||
# to be populated and the key can be overwritten at runtime | ||
export COMPRL_DB_PATH="/comprl-config/comprl.db" | ||
touch $COMPRL_DB_PATH | ||
export COMPRL_REGISTRATION_KEY="BUILDTIME" | ||
|
||
# Deploy templates and prepare app | ||
reflex init | ||
# Download all npm dependencies and compile frontend | ||
reflex export --frontend-only --no-zip | ||
|
||
|
||
# cleanup | ||
apt-get clean | ||
pip cache purge | ||
|
||
%environment | ||
export REDIS_URL=redis://localhost | ||
export COMPRL_DB_PATH="/comprl-config/comprl.db" | ||
export COMPRL_REGISTRATION_KEY="rl-lecture" | ||
|
||
%runscript | ||
. /venv/bin/activate | ||
cd /comprl/comprl-web-reflex | ||
redis-server --daemonize yes | ||
reflex run --env prod "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
reflex==0.6.6.post3 | ||
reflex==0.6.8 | ||
passlib | ||
bcrypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.