The code that runs the ACBC-VIZ app
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-28 18:47:22 -02:30
.streamlit Instrument file uplaoding logic first version 2026-03-19 16:32:52 -02:30
assets Readme updated 2026-04-08 16:33:00 -02:30
tabs ncols changed for better visuals 2026-04-14 10:13:44 -02:30
utils bug fixed 2026-04-14 10:04:47 -02:30
.gitignore Firs draft 2026-02-19 21:54:36 -03:30
.python-version Firs draft 2026-02-19 21:54:36 -03:30
dockerfile update on opt/storage 2026-07-28 18:47:22 -02:30
main.py Guard rails for missing .db and .json added 2026-04-08 15:49:13 -02:30
pyproject.toml Improved schema show 2026-04-14 09:22:22 -02:30
README.md Updated UID and GID for acbcapp 2026-07-28 18:38:02 -02:30
uv.lock Improved schema show 2026-04-14 09:22:22 -02:30

🦦 ACBC Web App

ACBC Logo

Click the logo to visit the website


Run Locally

Prerequisites

  • Python >= 3.13.11
  • uv >= 0.9.26

Steps

  1. Install dependencies:
    uv sync
    
  2. Run the app:
    uv run streamlit run main.py
    
  3. Access at http://localhost:8501.

Deploy on Arbutus VM

Prerequisites

  • SSH access to acbcproduction on 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/ACBC and /opt/acbc-app/acbc-config with 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

  1. SSH into VM:

    ssh -J <user>@206-12-100-80.cloud.computecanada.ca <user>@acbcproduction
    

    Enter your private key password when prompted.

  2. Switch to Root and Navigate:

    sudo -s -H
    cd /opt/acbc-app
    
  3. Remove Old Code:

    rm -rf acbc-code
    
  4. Clone Latest Code:

    git clone https://github.com/bespinosaaco/acbc-code.git
    

    Provide Git credentials when prompted.

  5. Stop and Remove Existing Container:

    docker ps -a
    docker container stop acbc
    docker container rm acbc
    
  6. Remove Old Image:

    docker image list
    docker image rm acbc:latest
    
  7. Clean Docker Cache:

    docker builder prune
    
  8. Build and Run Container:

    cd /opt/acbc-app/acbc-code                        # make sure you are in the code folder
    
    docker build -t acbc:latest .                         # builds the acbc container from dockerfile
    
    docker 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 nonroot user, with persistent storage, automatic restarts, and port 8501 exposed 
    
  9. Verify: Access the app at https://206-12-100-80.cloud.computecanada.ca/.