diff --git a/docs/site/docker.md b/docs/site/docker.md new file mode 100644 index 00000000000..553247da7b4 --- /dev/null +++ b/docs/site/docker.md @@ -0,0 +1,98 @@ +--- +layout: site +title: Use SystemDS with Docker +--- + + + +[Docker](https://docs.docker.com/get-docker/) enables you to separate applications from +your infrastructure. This provides a way to manage the instrafrastructure the same way +you do with the software. + +With Docker, enabling GPU support would be much easier on linux. Since only the NVIDIA +GPU drivers are required on the host machine (NVIDIA CUDA toolkit is not required). + +## SystemDS Docker requirements + +Install [Docker](https://docs.docker.com/get-docker/) specific to your machine + +Note: If you would like to manage docker as a non-root user, refer to +[linux-postinstall](https://docs.docker.com/engine/install/linux-postinstall/) + +## Download SystemDS Docker image + +The official SystemDS docker images are located at [apache/systemds](https://hub.docker.com/r/apache/systemds) +Docker Hub repository. Image releases are tagged based on the release channel: + +| Tag | Description | +| --- | --- | +| `nightly` | Builds for SystemDS `main` branch. Used by SystemDS developers | + + +Usage examples: + +```sh +docker pull apache/systemds:nightly # Nightly release with CPU +``` + +### Start the Docker container + + +Options: + +- `-it` - interactive +- `--rm` - cleanup +- `-p` - port forwarding + +For comprehensive guide, refer [`docker run`](https://docs.docker.com/engine/reference/run/) + +```sh + +docker run [-it] [--rm] [-p hostPort:containerPort] apache/systemds[:tag] [command] +``` + +#### Examples + +To verify the SystemDS installation, + +Create a `dml` file, for example + +```sh +touch hello.dml + +cat <>./hello.dml +print("This is SystemDS") +EOF +``` +and run it. + +```sh +docker run -it --rm -v $PWD:/tmp -w /tmp apache/systemds:nightly systemds ./hello.dml +``` + +The output is `"This is SystemDS"` after successful installation. +For SystemDS usage instructions, see [standalone instructions](./run). + + +This way you can run a DML program developed on the host machine, mount the host directory and change the +working directory with [`-v` flag](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems) +and [`-w` flags](https://docs.docker.com/engine/reference/run/#workdir). + +