Crynux Network
HomeBlogGitHubTwitterDiscordNetstats
  • Crynux Network
  • Releases
    • Helium Network
    • Hydrogen Network
  • System Design
    • Network Architecture
    • Consensus Protocol
      • Inference Task Validation
      • Training/FT Task Validation
    • Verifiable Secret Sampling
    • Task Lifecycle
      • Task State Transitions
    • Task Dispatching
    • Task Pricing
    • Quality of Service (QoS)
    • Model Distribution
  • Node Hosting
    • Start a Node
      • Start a Node - Windows
      • Start a Node - Mac
      • Start a Node - Linux
      • Start a Node - Docker
      • Start a Node - Vast
    • Get the Test CNX Tokens
    • Private Key Security
    • Assign GPU to the Node
    • Proxy Settings
    • Docker Compose Options
    • Advanced Configuration
  • Application Development
    • How to Run LLM using Crynux Network
    • Application Workflow
    • Execute Tasks
      • Text-to-Image Task
      • Text-to-Text Task
      • Text-to-Music Task
      • Text-to-Video Task
      • Fine-Tuning Task
    • Crynux Bridge
    • API Specification of the Relay
    • Crynux SDK
  • Crynux Token
    • Wallet Configuration
      • Metamask
  • Troubleshooting
    • FAQ
    • Locate the Error Message
    • Exceptions in WebUI
  • Misc
    • Privacy Policy
Powered by GitBook
On this page
  • Start the container using Docker Compose
  • Mount the Model Cache Folder
  • Mount the Config File
Edit on GitHub
  1. Node Hosting

Docker Compose Options

Start the Node using Docker Compose

The Docker container of the Node could also be started using Docker Compose, for more convenient configurations.

Start the container using Docker Compose

1. Create an empty working directory

$ mkdir h_node
$ cd h_node

2. Create a file named docker-compose.yml in the working directory:

---
version: "3.8"
name: "crynux_node"

services:
  h_node:
    image: ghcr.io/crynux-ai/crynux-node:latest
    container_name: crynux_node
    restart: unless-stopped
    ports:
      - "127.0.0.1:7412:7412"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]

3. Start the Docker container

docker compose up -d

Now you should already be able to access the WebUI from the browser.

Mount the Model Cache Folder

Since the model preloading takes a long time, often we want to persist the model cache folder outside of the Docker container so that it survives the container recreation during updates. This is easily done by mounting the data folder /app/data to a local folder on the host machine:

1. Create an empty data folder inside the working directory

$ ls .
docker-compose.yml

$ mkdir data

$ ls .
data/ docker-compose.yml

2. Add the mounting point in the docker-compose.yml file

---
version: "3.8"
name: "crynux_node"

services:
  h_node:
    image: ghcr.io/crynux-ai/crynux-node:latest
    container_name: crynux_node
    restart: unless-stopped
    ports:
      - "127.0.0.1:7412:7412"
    volumes:
      - "./data:/app/data"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]

3. Start the Docker container

docker compose up -d

Mount the Config File

The configuration file could also be mounted to the local folder, so the config won't be overridden by the container recreating. It is also easier to edit the config file outside of the Docker container.

1. Create an empty config folder inside the working directory

$ ls .
data/ docker-compose.yml

$ mkdir config

$ ls .
config/ data/ docker-compose.yml

2. Add the mounting point in the docker-compose.yml file

---
version: "3.8"
name: "crynux_node"

services:
  h_node:
    image: ghcr.io/crynux-ai/crynux-node:latest
    container_name: crynux_node
    restart: unless-stopped
    ports:
      - "127.0.0.1:7412:7412"
    volumes:
      - "./data:/app/data"
      - "./config:/app/config"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]

3. Start the Docker container

docker compose up -d

4. A config file will be created automatically after the container creation

$ ls config/
config.yml
PreviousProxy SettingsNextAdvanced Configuration

Last updated 1 year ago

For an explanation of all the config items, please refer to the .

Advanced Configuration