How to install Scalar DL in your local environment with Docker
This document shows how to set up a local environment that runs Scalar DL along with the back-end Cassandra server using Docker Compose.
Follow the instructions on the Docker website according to your platform.
Clone scalardl-samples repository
scalar-labs/scalardl-samples repository is a project for users to start working on Scalar DL instantly.
Determine the location on your local machine where you want to run the
scalardl-samples app. Then open the terminal and
cd to the directory and run the
$ git clone https://github.com/scalar-labs/scalardl-samples.git $ cd scalardl-samples
docker login is required to start the Scalar DL Docker image. Because the
on GitHub Container Registry is currently private, your GitHub account needs to be set with permissions to access the container images.
Ask a person in charge to get your account ready. Note also that you need to use a personal access token (PAT) as a password to login
ghcr.io. Please read the official document for more detail.
# read:packages scope needs to be selected in a personal access token to login $ export CR_PAT=YOUR_PERSONAL_ACCESS_TOKEN $ echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
Start up Scalar DL Ledger
The following command starts up Scalar DL Ledger along with the back-end Cassandra server in the Docker containers. At the first time you run the command, the required Docker images will be downloaded from GitHub Container Registry.
$ docker-compose up
You may want to run the containers in the background. Add the
$ docker-compose up -d
When you want to use Auditor component, run the following command.
$ docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up -d
Shut down Scalar DL Ledger
To shut down the containers:
- If you started the containers in the foreground, type
Ctrl+Cin the terminal where
- If you started the containers in the background, run the following command.
$ docker-compose down # When Auditor is running $ docker-compose -f docker-compose.yml -f docker-compose-auditor.yml down