Files
AIPass/setup-workspace.sh
T
AIOSAI 34f303f285 📦 build(docker): update base image setup and workspace initialization
- replace git and curl with python3-full package for dependencies
- create python virtualenv owned by user 1000 for permission consistency
- add entrypoint scripts in /etc/entrypoint.d to avoid shadowing by bind mounts
- override ENTRYPOINTD environment variable to use non-shadowed entrypoint scripts
- switch to user 1000 instead of coder user for container runtime
- use official base image entrypoint with fixuid and dumb-init for process management
- set default code-server workspace to /home/coder/workspace for consistency

📝 docs(readme): overhaul README to reflect current state and usage

- simplify introduction with focus on core AIPass features and status
- update quick start instructions for source install and basic commands
- add Docker usage example for isolated testing with VS Code
- provide core concepts for drone command router and seedgo standards
- rewrite seedgo plugin example and built-in plugin list with formatting
- remove old API examples and deprecated instructions
- add module architecture and status table for all 10 modules
- clarify configuration and environment variable usage
- update requirements and license sections for clarity

📦 build(scripts): add setup-workspace.sh for container initialization

- script ensures workspace directory is writable by coder user
- clones AIPass repo if not already present in workspace
- installs AIPass in editable mode to keep dependencies up to date
- designed to run as container entrypoint.d script for first boot setup
2026-03-06 01:16:41 -08:00

28 lines
751 B
Bash

#!/bin/bash
set -e
WORKSPACE="/home/coder/workspace"
REPO="git@github.com:AIOSAI/AIPass.git"
export PATH="/opt/venv/bin:$PATH"
# Ensure workspace directory is writable by coder
if [ -d "$WORKSPACE" ] && [ ! -w "$WORKSPACE" ]; then
echo "==> Fixing workspace permissions..."
sudo chown -R coder:coder "$WORKSPACE"
fi
# Clone repo if not already present
if [ ! -d "$WORKSPACE/.git" ]; then
echo "==> First boot: cloning AIPass from GitHub..."
git clone "$REPO" "$WORKSPACE"
echo "==> Installing AIPass in editable mode..."
cd "$WORKSPACE"
pip install -e .
echo "==> Workspace ready!"
else
echo "==> Workspace exists, ensuring deps are installed..."
cd "$WORKSPACE"
pip install -e . 2>/dev/null || true
fi