ARC Setup Guide

ARC (Anthonian Runtime Configurator) creates a reliable, reproducible Python environment for the HLS for AI labs. It prefers conda and falls back to venv automatically.

Who is this for?

  • Students running labs on OSU Flip or Babylon.
  • Anyone on Linux who needs a clean, CPU‑only PyTorch stack with sensible toolchain checks.

What you’ll need

  • A Linux shell (Flip/Babylon, local Linux, or WSL - note ARC only supports Linux).
  • ~1.5 GB free disk space recommended.
  • Git installed to clone the repo.

Step 1 - Clone the Repository

Clone the environment setup repository from GitHub:

bash
git clone https://github.com/Anthonykung/hls-for-ai-lab1-env.git
cd hls-for-ai-lab1-env

This folder contains:

  • setup.sh - the ARC setup script
  • requirements.txt - additional Python dependencies for the labs
  • .gitignore - ignores environment and cache files

Step 2 - Run ARC (Quick Start)

bash
# from the repo root
bash setup.sh

ARC will:

  1. Detect conda → use it (or venv if conda is missing/broken).
  2. Create and activate the environment.
  3. Install CPU‑only torch, torchvision, torchaudio.
  4. Resolve and install requirements.txt without changing the torch stack.
  5. Print versions + a short cheat sheet.
  6. Save logs to install.log.

Step 3 - Choosing Your Environment Manager (Optional)

You can force the manager via flags or environment variable:

Flags

bash
bash setup.sh --conda             # prefer conda; fallback to venv if needed
bash setup.sh --venv              # force venv; skip conda attempts
bash setup.sh --conda --python 3.11
bash setup.sh --name arc_env      # set conda env name (default: arc_env)
bash setup.sh --venv --venv-dir .env   # set venv directory (default: .venv)

Environment variable

bash
ENV_MANAGER=conda bash setup.sh
ENV_MANAGER=venv  bash setup.sh

Step 4 - Verify the Installation

After setup, run the quick torch check appropriate to your manager.

If ARC used conda

bash
conda activate arc_env
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
conda deactivate

If ARC used venv

bash
source .venv/bin/activate
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
deactivate

You should see torch.cuda.is_available() print False (CPU‑only expected).

Step 5 - Daily Workflow

  1. Activate your env (conda activate arc_env or source .venv/bin/activate).
  2. Work on labs: notebooks, C/C++ builds as assigned.
  3. If something breaks, read install.log, then rerun ARC or recreate the env.

Step 6 - Common Tasks

  • Install an extra package (conda):
bash
conda activate arc_env
conda install <package>
  • Install an extra package (venv):
bash
source .venv/bin/activate
pip install <package>
  • Recreate from scratch:
bash
# conda
conda deactivate 2>/dev/null || true
conda remove -n arc_env --all -y
bash setup.sh --conda

# venv
deactivate 2>/dev/null || true
rm -rf .venv
bash setup.sh --venv

Troubleshooting

“Linux only” error → Use Flip/Babylon or a Linux host (WSL not supported by ARC).

python3-venv missing (venv path) → Install your distro’s venv package (e.g., sudo apt install python3-venv).

Conda exists but not initializedconda init bash then open a new shell; or run ARC with --venv.

Low disk space → Free space to at least ~1.5 GB.

pkg-config/pkgconf version complaint → On venv path ARC only verifies. Consider using the conda path so ARC installs modern toolchains in‑env.

CXXABI / libstdc++ import errors → Prefer conda path so modern C/C++ runtimes live inside the env.

Torch conflicts → ARC pins torch/vision/audio and constrains requirements.txt. If you changed them manually, rerun ARC.

Where are the logs?

  • install.log (latest)
  • install.log.1 (previous run)

Support

Having trouble? Include install.log when you ask for help.

Was this page helpful?