The code that runs the ACBC-VIZ app
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .streamlit | ||
| assets | ||
| tabs | ||
| utils | ||
| .gitignore | ||
| .python-version | ||
| dockerfile | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
🦦 ACBC Web App
Run Locally
Prerequisites
Python>= 3.13.11uv>= 0.9.26
Steps
- Install dependencies:
uv sync - Run the app:
uv run streamlit run main.py - Access at
http://localhost:8501.
Deploy on Arbutus VM
Prerequisites
-
SSH access to
acbcproductionon Arbutus VM. -
Git credentials for
https://206-12-100-80.cloud.computecanada.ca/acbc-repo/acbc/acbc-code-v2.git. -
Host directories
/opt/acbc-app/ACBCand/opt/acbc-app/acbc-configwith permissions set to UID/GID 1005:sudo mkdir -p /opt/acbc-app/{ACBC,acbc-config} sudo chown -R 997:987 /opt/acbc-app/ACBC /opt/acbc-app/acbc-config sudo chmod -R u+rwX /opt/acbc-app/ACBC /opt/acbc-app/acbc-config
Final Directory structure
opt/
└── acbc-app/
├── ACBC/ # Data/Database directory
| ├── data/ # Instrumental data hosting directories
| ├── documentation/ # Documentation files .md .json .mp4
| ├── weekly/ # weekly report pictures
| ├── ACBC.db # main database SQL format
| └── metadata.json # tables metadata builder
├── acbc-config/ # Sectrets & config
└── acbc-code-v2/ # Aplication code
Steps
-
SSH into VM:
ssh -J <user>@206-12-100-80.cloud.computecanada.ca <user>@acbcproductionEnter your private key password when prompted.
-
Switch to Root and Navigate:
sudo -s -H cd /opt/acbc-app -
Remove Old Code:
rm -rf acbc-code -
Clone Latest Code:
git clone https://github.com/bespinosaaco/acbc-code.gitProvide Git credentials when prompted.
-
Stop and Remove Existing Container:
docker ps -a docker container stop acbc docker container rm acbc -
Remove Old Image:
docker image list docker image rm acbc:latest -
Clean Docker Cache:
docker builder prune -
Build and Run Container:
cd /opt/acbc-app/acbc-code # make sure you are in the code folderdocker build -t acbc:latest . # builds the acbc container from dockerfiledocker run --name acbc --user 997:987 --restart unless-stopped -v ../ACBC:/opt/storage -v ../acbc-config:/app/.streamlit -p 8501:8501 -d acbc:latest# This command starts a container in the background named acbc, using the image acbc:latest, running as a non‑root user, with persistent storage, automatic restarts, and port 8501 exposed -
Verify: Access the app at
https://206-12-100-80.cloud.computecanada.ca/.