BrainForge-Demo / app.py
neondaniel's picture
Initial implementation of demo running from GitHub package
86d83ef
raw
history blame contribute delete
505 Bytes
from os import environ, chdir
from subprocess import run, PIPE
# Install Demo Application
run(["git", "clone",
f"https://{environ['GITHUB_TOKEN']}@github.com/neongeckocom/brainforge-webapp",
"-b", environ["GITHUB_BRANCH"]])
run(["pip", "install", "./brainforge-webapp"])
# Get Demo Commit ID
chdir("brainforge-webapp")
commit = run(["git", "rev-parse", "--short", "HEAD"], stdout=PIPE).stdout.decode('utf-8').strip()
environ["GH_COMMIT"] = commit
from brainforge_webapp.app import run
run()