This directory contains tools for setting up and configuring dsHPC environments.
Configuration file that defines the environment settings:
{
"environment_name": "dsHPC",
"display_name": "High-Performance Computing for DataSHIELD",
"docker_stack_prefix": "dshpc",
"base_repository": "https://github.com/isglobal-brge/dsHPC-docker.git",
"default_api_port": 8001,
"description": "DataSHIELD High-Performance Computing Environment"
}Configuration Options:
environment_name: Short name used for directories and referencesdisplay_name: Full name shown in the setup processdocker_stack_prefix: Prefix for Docker container and network namesbase_repository: Git repository URL to clone fromdefault_api_port: Default port for the API servicedescription: Brief description of the environment
Main setup script that automates the environment deployment process.
The user should have a directory with their environment configuration:
my-project/
├── environment/
│ ├── methods/
│ │ ├── commands/
│ │ └── scripts/
│ ├── python.json
│ ├── r.json
│ └── system_deps.json
└── setup-dshpc-environment.sh
Run the setup script:
./setup-dshpc-environment.sh- Validates the environment directory structure
- Clones the base repository from GitHub
- Copies user's environment configuration
- Generates a
.envfile with random API key - Builds Docker images (optional)
- Provides startup instructions
After running the script:
my-project/
├── environment/ # Original user config
├── dsHPC-docker/ # Cloned and configured repository
│ ├── .env # Generated environment variables
│ ├── environment/ # User's config copied here
│ ├── config/ # User's config copied here (if exists)
│ ├── docker-compose.yml # Ready to use
│ └── src/ # Source code
└── setup-dshpc-environment.sh
The script generates a .env file with these variables:
# API Configuration
DSHPC_API_EXTERNAL_PORT=8001
DSHPC_API_KEY=randomly-generated-32-char-key
# Docker Stack Configuration
COMPOSE_PROJECT_NAME=dshpc
# Logging Configuration
LOG_LEVEL=WARNINGTo customize for different environments:
- Modify
environment-config.jsonwith your settings - Update the base repository URL to point to your fork
- Change naming conventions by updating the docker prefix
- Adjust default ports and other settings
Required:
git- for cloning the repositorydockeranddocker-compose- for building and running
Optional:
jq- for JSON parsing (has fallback)openssl- for secure key generation (has fallback)