Local machine: advanced
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
This article provides additional options for running Datagrok on your local machine using Docker Compose. By following these instructions, you can customize your local Datagrok stand or even start the second one.
Minimal hardware requirements: 60 GB of free disk space, 4 CPUs, 8 GB RAM.
Prerequisites
-
Install and launch the latest Docker Desktop application for your operating system:
-
Clone public repository with docker-compose file
-
Open the command-line interface and navigate to the directory where you cloned the repository.
Installing Datagrok
-
Get latest Datagrok docker images
docker compose -f docker\localhost.docker-compose.yaml --profile all pulldocker compose -f docker/localhost.docker-compose.yaml --profile all pull -
Run the basic Datagrok stand
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile all up -dnoteIf you encounter an error related to a
WriteFilefunction when runningdocker-compose upon Windows, try running the command prompt (cmd) in Administrator mode. This is a known issue with Docker on certain computers.docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile all up -d -
After the docker compose process is completed, wait for approximately 1 minute for the Datagrok server to spin up. Once the server is up and running, open http://localhost:8080 in your browser and log in.
Log in to Datagrok
- Once the server is up and running, open your browser and go to http://localhost:8080.
- On the login page, use the following credentials to login:
- Login or Email:
admin - Password
admin
- Login or Email:
If you see the message Datagrok server is unavailable, wait for approximately 1 minute for the server to start, and
then reload the page.
CVM features
If you do not need CVM features, you can run only Datagrok application containers to save space and resources:
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^
--profile datagrok --profile db up -d
docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \
--profile datagrok --profile db up -d
If you need CVM features only, you can run only CVM application containers:
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^
--profile cvm up -d
docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \
--profile cvm up -d
To run Datagrok with exact CVM features, specify them in the command line using the --profile flag
-
Cheminformatics
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile datagrok --profile db --profile chem up -ddocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile datagrok --profile db --profile chem up -d -
Jupyter notebook
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile datagrok --profile db --profile jupyter_notebook up -ddocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile datagrok --profile db --profile jupyter_notebook up -d -
Scripting
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile datagrok --profile db --profile scripting up -ddocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile datagrok --profile db --profile scripting up -d -
Modeling
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile datagrok --profile db --profile modeling up -ddocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile datagrok --profile db --profile modeling up -d -
Features can be enabled in any combination
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile datagrok ^--profile db ^--profile chem ^--profile scripting ^--profile jupyter_notebook ^--profile modeling ^up -ddocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile datagrok \--profile db \--profile chem \--profile scripting \--profile jupyter_notebook \--profile modeling \up -d -
Datagrok container is not required to be started for any feature, so you can omit it in run parameters
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile chem ^--profile scripting ^--profile jupyter_notebook ^--profile modeling ^up -ddocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile chem \--profile scripting \--profile jupyter_notebook \--profile modeling \up -d
Multiple stands
It is possible to run multiple stands of Datagrok on one host machine. To do so:
-
Run the first stand as described in instruction.
-
Set the Docker images versions with the environment variables. It can be any tag from Docker Hub.
Environment variable Default value DATAGROK_VERSION latest GROK_SPAWNER_VERSION latest GROK_CONNECT_VERSION latest GROK_COMPUTE_VERSION latest set DATAGROK_VERSION=latestset GROK_SPAWNER_VERSION=latestset GROK_CONNECT_VERSION=latestset GROK_COMPUTE_VERSION=latestexport DATAGROK_VERSION='latest'export GROK_SPAWNER_VERSION='latest'export GROK_CONNECT_VERSION='latest'export GROK_COMPUTE_VERSION='latest' -
Set environment variables for mapped ports:
Environment variable Default value DATAGROK_PORT 8080 DATAGROK_DB_PORT 5432 DATAGROK_CVM_PORT 8090 DATAGROK_H2O_PORT 54321 DATAGROK_H2O_HELPER_PORT 5005 GROK_SPAWNER_PORT 8000 GROK_CONNECT_PORT 1234 DATAGROK_DEMO_POSTGRES_NORTHWIND_PORT 5433 DATAGROK_DEMO_POSTGRES_CHEMBL_PORT 5434 DATAGROK_DEMO_POSTGRES_UNICHEM_PORT 5435 DATAGROK_DEMO_POSTGRES_STARBUCKS_PORT 5436 DATAGROK_DEMO_POSTGRES_WORLD_PORT 5437 To start the second stand properly the values should differ from the ports of the existing stands. For example, you can increment every port value by 11.
set DATAGROK_PORT=8091set DATAGROK_DB_PORT=5444set DATAGROK_CVM_PORT=8101set DATAGROK_H2O_PORT=54332set DATAGROK_H2O_HELPER_PORT=5016set GROK_SPAWNER_PORT=8011set GROK_CONNECT_PORT=1245set DATAGROK_DEMO_POSTGRES_NORTHWIND_PORT=5444set DATAGROK_DEMO_POSTGRES_CHEMBL_PORT=5445set DATAGROK_DEMO_POSTGRES_UNICHEM_PORT=5446set DATAGROK_DEMO_POSTGRES_STARBUCKS_PORT=5447set DATAGROK_DEMO_POSTGRES_WORLD_PORT=5448export DATAGROK_PORT=8091export DATAGROK_DB_PORT=5444export DATAGROK_CVM_PORT=8101export DATAGROK_H2O_PORT=54332export DATAGROK_H2O_HELPER_PORT=5016export GROK_SPAWNER_PORT=8011export GROK_CONNECT_PORT=1245export DATAGROK_DEMO_POSTGRES_NORTHWIND_PORT=5444export DATAGROK_DEMO_POSTGRES_CHEMBL_PORT=5445export DATAGROK_DEMO_POSTGRES_UNICHEM_PORT=5446export DATAGROK_DEMO_POSTGRES_STARBUCKS_PORT=5447export DATAGROK_DEMO_POSTGRES_WORLD_PORT=5448 -
The last step is to run the second stand. It is important to change the project name to start the second Datagrok stand. The project name in the standard instructions, which were used for the first stand, is
datagrok. For example, you can add an increment to the project name:datagrok_2docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok_2 ^--profile all up -ddocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok_2 \--profile all up -d
Demo Databases
Datagrok offers demo databases that include sample data. To install them locally, run the following command:
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok_2 ^
--profile all --profile demo up -d
docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok_2 \
--profile all --profile demo up -d
Shutting down Datagrok
To shut down Datagrok use this command:
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^
--profile all --profile demo stop
docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \
--profile all --profile demo stop
All the data is saved in the Docker volumes.
To reset Datagrok to factory settings and remove all stored data, including all created users, projects, connections, etc., run the following command:
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^
--profile all --profile demo down --volumes
docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \
--profile all --profile demo down --volumes
Troubleshooting
-
In case of any issues, check the settings in the Datagrok (Tools -> Settings...).
- Connectors
- External Host:
grok_connect
- External Host:
- Scripting:
- CVM Url:
http://cvm:8090 - CVM URL Client:
http://localhost:8090 - H2o Url:
http://h2o:54321 - API Url:
http://datagrok:8080/api - Cvm Split:
true
- CVM Url:
- Dev:
- CVM Url:
http://localhost:8090 - Cvm Split:
true - API Url:
http://datagrok:8080/api
- CVM Url:
- Connectors
-
Check containers logs for any possible errors and report the problem if there are any
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile all --profile demo logsdocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile all --profile demo logsYou can also watch the logs of the desired service in real-time.
- Replace
<service>with the necessary service name - Replace
<number>with desired log lines to watch or remove--tail <number>at all, if you want to see the full log
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile all --profile demo logs -f --tail <number> <service>docker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile all --profile demo logs -f --tail <number> <service> - Replace
-
Restart Docker compose stand
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile all --profile demo downdocker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile all --profile demo up -ddocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile all --profile demo downdocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile all --profile demo up -d -
For advanced service troubleshooting, you can access the containers shell.
- Replace
<service>with one of the services: db, datagrok, grok_connect, grok_compute, grok_spawner, jupyter_notebook, jupyter_kernel_gateway, h2o, etc.
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile all --profile demo exec <service> /bin/shdocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile all --profile demo exec <service> /bin/sh - Replace
-
Docker logs might take up all your free disk space. If such a situation has already taken place:
- Limit Disk Usage using Docker Desktop Resources Settings
- Or add to the Docker Daemon configuration log properties.
-
As your last resort, recreate stand completely
docker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile all --profile demo down --volumesdocker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile all --profile demo pulldocker compose -f docker\localhost.docker-compose.yaml --project-name datagrok ^--profile all --profile demo up -ddocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile all --profile demo down --volumesdocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile all --profile demo pulldocker compose -f docker/localhost.docker-compose.yaml --project-name datagrok \--profile all --profile demo up -d