diff --git a/clr-sdk/Dockerfile b/clr-sdk/Dockerfile deleted file mode 100644 index d49a9df..0000000 --- a/clr-sdk/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM clearlinux:latest - -ARG swupd_args - -COPY setup.py /usr/bin/setup.py - -# Update and add bundles -RUN swupd update $swupd_args && \ - swupd bundle-add os-clr-on-clr $swupd_args && \ - chmod 755 /usr/bin/setup.py - -ENTRYPOINT ["/usr/bin/setup.py"] - diff --git a/clr-sdk/README.md b/clr-sdk/README.md deleted file mode 100644 index 21b3612..0000000 --- a/clr-sdk/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Clear SDK Container -[![](https://images.microbadger.com/badges/image/clearlinux/clr-sdk.svg)](https://microbadger.com/images/clearlinux/clr-sdk "Get your own image badge on microbadger.com") -[![](https://images.microbadger.com/badges/version/clearlinux/clr-sdk.svg)](https://microbadger.com/images/clearlinux/clr-sdk "Get your own version badge on microbadger.com") - -This repo provides a Clear Linux* SDK container for running the Clear Linux devloper tools. This container will allow you to use the [mixer tool](https://clearlinux.org/features/mixer) on your Linux host. - -> ### :warning: **IMPORTANT NOTE:** -> As of `mixer` version `5.0.0`, you **must** run `mixer` with the `--native` -> flag inside the `clr-sdk` container. This is because `mixer` now attempts to -> automatically run build commands within a Docker container containing the -> correct toolchain version for the mix you are building. This is not possible -> if you are already running within the `clr-sdk` container. The `--native` flag -> foregoes this container launch, allowing the build to proceed as normal. -> -> If you _need_ this containerized `mixer` behavior to build across formats, it -> is possible to mount the host system's Docker socket when you launch the -> container (i.e., passing `-v /var/run/docker.sock:/var/run/docker.sock` to -> your `docker run`). This has the effect of the in-container Docker actually -> spawning _sibling_ containers on the host system, rather than _child_ -> containers within the `clr-sdk` container. In this case, the workdir path -> _inside_ the container must match the path on the host, as it is the host's -> Docker daemon that will be interpreting the path. - -# Build -## Building Locally - -``` -docker build -t clearlinux/clr-sdk . -``` -> #### Note: -> If you are behind a firewall, you may need to pass the `--network host`, -> `--build-arg http_proxy=http://:`, -> `--build-arg https_proxy=https://:`, and/or -> `--build-arg no_proxy=http://:`, flags to `docker build` to -> configure your proxy. - -#### Optional Build ARGs -* `--build-arg swupd_args` specifies [SWUPD](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags passed to the update during build. -## Pulling from Dockerhub -``` -docker pull clearlinux/clr-sdk -``` - -# Run -* **Create a mix directory** - - The directory you create will be used for the output created while using the container. - ``` - mkdir -p /home/myuser/mix - ``` - *It is important that you are the owner of this directory.* The owner of the - directory is what determines the user id used inside the container. If you - are not the owner of the directory, you may not have access to the files the - container creates. -* **Running the Docker container** - - Assuming you created the mix directory as described above, the command t -o run the Docker container would be: - ``` - docker run --rm -it -v /home/myuser/mix:/home/clr/mix clearlinux/clr-sdk --mixdir=/home/clr/mix - ``` - ### A note on the arguments: - #### `docker run` arguments - * `--rm` cleans up and removes the container once you exit it. The files - generated in the mounted directory will persist on the host. - * `-it` attaches an interactive terminal. - * `-v /path/on/host:/path/in/container` bind mounts a directory on the host - to a path inside the container. Only the files generated in this path - inside the container will be accessible on the host or persist after - the container has exited. The container path will be automatically - generated within the container if it doesn't already exist, and will - replace whatever may already be there, so _use caution_. - * If you plan to run `sudo mixer build image` inside the container, you - must additionally pass `--privileged -v /dev:/dev` to `docker run`. This is - because `mixer build image` needs to mount a loopback device for generating - the image filesystem. The `-v /dev:/dev` bind mount is due to an [outstanding - issue](https://github.com/moby/moby/issues/27886) where loopback devices - created within the container are not visible within the container. - > ### :warning: **IMPORTANT NOTE:** - > Running the container in this way can have **serious side effects** on - > your host machine, so only use these flags for this specific command. **Do - > not run the container this way as your regular work flow.** - > - > * `--privileged` permits the container to create the loopback device, but - > also removes other security limitations normally placed on containers. - > * `-v /dev:/dev` permits the container to see the loopback device, but - > also gives the container direct access to the _host's_ entire device - > directory, including all mounted drives. - * If you are behind a firewall, you may need to pass the `--network host` - flag to `docker run`, and then set your `http_proxy` and `https_proxy` - environment variables within the container to configure your proxy. - * Please see note above about mounting the host system's Docker socket if - you cannot use the `--native` flag when running `mixer`. - #### Container arguments - * `-d`|`--mixdir` tells the startup script what directory you mounted using - the `-v` option above. The owner UID and GID of this directory will be - used for user inside the container. This is also the active directory when - the container runs. Omitting this argument will result in a default user - id and active directory, _even if you mounted a directory with -v_. This - can be useful, but is likely not what you want, and may cause the container - user to not have permission to access the mounted mix directory. - * `--id` manually sets the UID and GID for the user inside the container. - Should be in the form UID:GID. Takes precedence over id inferred by - mixdir argument. This may cause the container user to not have permission - to access the mounted mix directory. - - At this point, you should be able to run the commands described in the - [mixer guide](https://clearlinux.org/documentation/clear-linux/guides/maintenance/mixer). - **Please see the note above about the `--native` flag.** diff --git a/clr-sdk/setup.py b/clr-sdk/setup.py deleted file mode 100755 index 68de628..0000000 --- a/clr-sdk/setup.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/python3 - -import argparse -import subprocess -import os -import sys -import pathlib - -parser = argparse.ArgumentParser() -parser.add_argument('-d','--mixdir', - help='The directory where you intend to make your mix. ' - 'This will be the active directory once the container ' - 'is running. In the abscence of the "id" argument, ' - 'the owner uid and gid of the mixdir will be used for ' - 'the user in the container.') - -parser.add_argument("--id", - help='UID and GID to use for the user inside the ' - 'container. It should be in the form UID:GID.') - -args = parser.parse_args() - -mixdir = args.mixdir if args.mixdir else "/home/clr/mix" - - -# Get UID and GID for user -uid,gid = (None, None) -if args.id: - try: - uid,gid = args.id.split(":") - uid = int(uid) - gid = int(gid) - except ValueError: - sys.stderr.write("Invalid id: Must be of form UID:GID\n") - sys.exit(1) -elif args.mixdir: - # Use owner of mixdir - try: - stat = os.stat(args.mixdir) - uid,gid = (stat.st_uid, stat.st_gid) - except FileNotFoundError: - # This implies the --mixdir flag was passed, but to a - # directory that doesn't exist. It will get created below. - pass - -if not uid or not gid: - # Use default - uid,gid = (1000, 1000) -elif uid == 0 or gid == 0: - sys.stderr.write("UID and GID must both be non-zero.\n") - sys.exit(1) - -user = "clr" - -# Create the group and user -try: - cmd = "groupadd -o -g {} {}".format(gid,user) - subprocess.run(cmd.split(),stdout=subprocess.PIPE,stderr=subprocess.STDOUT,check=True) - # Note: adding user to mock group for access to running mock - cmd = "useradd -Nmo -g {} -G mock,wheelnopw -u {} {}".format(gid,uid,user) - subprocess.run(cmd.split(),stdout=subprocess.PIPE,stderr=subprocess.STDOUT,check=True) - os.chown("/home/{}".format(user),uid,gid) -except subprocess.CalledProcessError as e: - if e.returncode and e.returncode == 9: - # Both 'groupadd' and 'useradd' return error code 9 if the group/user - # already exists. This will happen if the container is restarted or - # this script is manually re-run. - pass - else: - sys.stderr.write("Error creating user.\n") - sys.exit(1) -except subprocess.SubprocessError: - sys.stderr.write("Error creating user.\n") - sys.exit(1) - -# Create the mix directory if it doesn't exist. -# Note: we catch FileExistsError rather than using exist_ok=True so -# that we only chown the directory if we're the one that created it. -try: - pathlib.Path(mixdir).mkdir(parents=True) - os.chown(mixdir,uid,gid) -except FileExistsError: - pass - -# Move to mixdir and start bash as new user -os.chdir(mixdir) -cmd = "su {}".format(user).split() -os.execvp(cmd[0], cmd) - diff --git a/openvino/Dockerfile b/openvino/Dockerfile deleted file mode 100644 index 2e49d7d..0000000 --- a/openvino/Dockerfile +++ /dev/null @@ -1,61 +0,0 @@ -FROM clearlinux:latest AS builder - -ARG swupd_args -# Move to latest Clear Linux release to ensure -# that the swupd command line arguments are -# correct -RUN swupd update --no-boot-update $swupd_args - -# Grab os-release info from the minimal base image so -# that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / - -# Install additional content in a target directory -# using the os version from the minimal base -RUN source /os-release && \ - mkdir /install_root \ - && swupd os-install -V ${VERSION_ID} \ - --path /install_root --statedir /swupd-state \ - --bundles=os-core-update,curl,computer-vision-openvino --no-boot-update - -# For some Host OS configuration with redirect_dir on, -# extra data are saved on the upper layer when the same -# file exists on different layers. To minimize docker -# image size, remove the overlapped files before copy. -RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ -RUN cd / && \ - find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true - -FROM clearlinux/os-core:latest - -COPY --from=builder /install_root / - -WORKDIR /app - -# path to save pre-downloaded models -ENV MODEL_DIR="/models" -ENV MO_PATH="/usr/share/openvino/model-optimizer/mo.py" - -# MODEL will be used by the container -# If not pre-downloaded, the entrypoint will try download it and set the MODEL_PATH -# ENVs values could be passed by users to dynamically choose model to be used -ENV MODEL_NAME="face-detection-retail-0005" -ENV MODEL_PRECISION="FP32" - -# pre-downloaded and converted models for openvino -COPY ./models.txt /app -RUN for m in $(cat /app/models.txt); do \ - model-downloader --name $m -o $MODEL_DIR && \ - model-converter --name $m -d $MODEL_DIR -o $MODEL_DIR --mo $MO_PATH; \ - done - -# Pre-install some python libs for serivce to use -COPY ./requirements.txt /app -RUN pip3 install -r /app/requirements.txt - -COPY ./set_model_path.sh /app -COPY docker-entrypoint.sh /usr/local/bin/ -RUN chmod +x /usr/local/bin/docker-entrypoint.sh -ENTRYPOINT ["docker-entrypoint.sh"] - diff --git a/openvino/README.md b/openvino/README.md deleted file mode 100644 index 392bb95..0000000 --- a/openvino/README.md +++ /dev/null @@ -1,206 +0,0 @@ -# Clear Linux* OS `openvino` container image - - -## What is this image? - -`clearlinux/openvino` is a Docker image with `dldt` running on top of the -[official clearlinux base image](https://hub.docker.com/_/clearlinux). - - -> [openvino](https://01.org/openvinotoolkit) OpenVINO™ toolkit, short -> for Open Visual Inference and Neural network Optimization toolkit, provides -> developers with improved neural network performance on a variety of -> Intel® processors and helps them further unlock cost-effective, real-time -> vision applications. - -For other Clear Linux* OS -based container images, see: https://hub.docker.com/u/clearlinux - -## Why use a clearlinux based image? - - -> [Clear Linux* OS](https://clearlinux.org/) is an open source, rolling release -> Linux distribution optimized for performance and security, from the Cloud to -> the Edge, designed for customization, and manageability. - -Clear Linux* OS based container images use: -* Optimized libraries that are compiled with latest compiler versions and - flags. -* Software packages that follow upstream source closely and update frequently. -* An aggressive security model and best practices for CVE patching. -* A multi-staged build approach to keep a reduced container image size. -* The same container syntax as the official images to make getting started - easy. - -To learn more about Clear Linux* OS, visit: https://clearlinux.org. - -## Supported Devices - -The dldt package in Clear Linux enables support for below devices. - - -| PLUGIN | DEVICE TYPES | -| ---------------------| -------------| -| CPU plugin | Intel® Xeon® with Intel® AVX2 and AVX512, Intel® Core™ Processors with Intel® AVX2, Intel® Atom® Processors with Intel® SSE | -| GPU plugin | Intel® Processor Graphics, including Intel® HD Graphics and Intel® Iris® Graphics | -| MYRIAD plugin | Intel® Movidius™ Neural Compute Stick powered by the Intel® Movidius™ Myriad™ 2, Intel® Neural Compute Stick 2 powered by the Intel® Movidius™ Myriad™ X | - -Therefore, this clearlinux/opevino container image could be used directly for above. -But please keep in mind, to run in docker for GPU/MYRIAD plugin, some devices have to -be mapping to the running container. - -Taking GPU plugin for example, attach the GPU to the container using `--device /dev/dri` -option and run the container: -``` -docker run -it --device /dev/dri clearlinux/openvino -``` - -For details please refer to the [link](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_docker_linux.html) - -## Environment variables - -#### MODEL_DIR -It is the root directory to save openvino models, default /models. - -#### MO_PATH -It points to the path of Model Optimizer mo.py. -It is "/usr/share/openvino/model-optimizer/mo.py" in default. - -#### MODEL_NAME -The model name to be used. -If it is not pre-downloaded, the entrypoint script will do the downloading and -converting to IR format. -Run the below command can get all supported models. -``` -docker run --rm clearlinux/openvino model-downloader --print_all -``` - -#### MODEL_PRECISION -The model precision to be chosen, FP32, FP16 or INT8. - -#### MODEL_PATH -The chosen model path, automatically set by the entrypoint script. - -For example, if using [`mobilenetv2-int8-tf-0001`](https://github.com/opencv/open_model_zoo/blob/master/models/intel/mobilenetv2-int8-tf-0001/description/mobilenetv2-int8-tf-0001.md) model to do classification, two environment variables need to be passed to the container. -Details can refer to the deployment below. - -Note, use trained and quantized INT8 fixed-point precision model such as `mobilenetv2-int8-tf-0001` -on AVX512 VNNI platform could get [big performance advantage](https://www.intel.ai/vnni-enables-inference/). - - -## Deployment: - -### Deploy with Docker -The easiest way to get started with this image is by simply pulling it from -Docker Hub. - -1. Pull the image from Docker Hub: - ``` - docker pull clearlinux/openvino - ``` - -2. Start one-time classification_sample with mobilenetv2-int8-tf-0001 model as below: - - * Use docker-compose to start the example: - ``` - docker-compose -f docker-compose.yml up - ``` - The configuration is defined in the - [`docker-compose.yml`](https://github.com/clearlinux/dockerfiles/blob/master/openvino/docker-compose.yml) - - -Or - -3. Start a simple openvino-server to accept image to do classification_sample with mobilenetv2-int8-tf-0001 model: - - * Use docker-compose to start the server first: - ``` - docker-compose -f docker-compose-server.yml up - ``` - The configuration is defined in the - [`docker-compose-server.yml`](https://github.com/clearlinux/dockerfiles/blob/master/openvino/docker-compose-server.yml) - - * Use curl to send image to the server for classification: - ``` - curl -H "Content-type: application/octet-stream" -X POST http://localhost:5000/image --data-binary @cat.bmp - ``` - - - -### Deploy with Kubernetes -This image can also be deployed on a Kubernetes cluster, such as -[minikube](https://kubernetes.io/docs/setup/learning-environment/minikube/).The -following example YAML files are provided in the repository as -reference for Kubernetes deployment: - - * [`classification.yaml`](https://github.com/clearlinux/dockerfiles/blob/master/openvino/classification.yaml): - yaml file to deploy the openvino classification example - -To deploy the image on a Kubernetes cluster: - - * Start the openvino classification example server. - ``` - kubectl apply -f classification.yaml - ``` - - * Then check if the pods are running well. - ``` - kubectl get pods -o wide - ``` - This may take some time because it requires downloading/converting the model. - Note, if your cluster is behind some proxy, you may need set the proxy - environment in the yaml file to make the model-init can download the model. - - * Get server PORT and IP - ``` - PORT=`kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services openvino-server` - NODEIP=`kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}"` - ``` - - * Use curl to send image to the server for classification: - ``` - curl -H "Content-type: application/octet-stream" -X POST http://$NODEIP:$PORT/image --data-binary @cat.bmp - ``` - - -## Build and modify: - -The Dockerfiles for all Clear Linux* OS based container images are available at -https://github.com/clearlinux/dockerfiles. These can be used to build and -modify the container images. - -1. Clone the clearlinux/dockerfiles repository. - ``` - git clone https://github.com/clearlinux/dockerfiles.git - ``` - -2. Change to the directory of the application: - ``` - cd openvino/ - ``` - -3. Build the container image: - ``` - docker build -t clearlinux/openvino . - ``` - - [`models.txt`](https://github.com/clearlinux/dockerfiles/blob/master/openvino/models.txt): - It defines the models will be pre-downloaded and converted to IR format in container image. - - [`requirements.txt`](https://github.com/clearlinux/dockerfiles/blob/master/openvino/requirements.txt): - It defines the python packages to be installed in container image. - - Refer to the Docker documentation for [default build - arguments](https://docs.docker.com/engine/reference/builder/#arg). - Additionally: - - - `swupd_args` - specifies arguments to pass to the Clear Linux* OS software - manager. See the [swupd man - pages](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) - for more information. - - -## Licenses - -All licenses for the Clear Linux* Project and distributed software can be found -at https://clearlinux.org/terms-and-policies diff --git a/openvino/app.py b/openvino/app.py deleted file mode 100644 index 77571b2..0000000 --- a/openvino/app.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/python3 -import subprocess -from flask import Flask, request -app = Flask(__name__) - -@app.route('/') -def classification_sample(): - return 'Classification sample' - -@app.route('/image', methods=['POST']) -def do_classification(): - if request.headers['Content-Type'] == 'application/octet-stream': - f = open('./image', 'wb') - f.write(request.data) - return subprocess.check_output("classification_sample_async -i ./image -m $MODEL_PATH/$MODEL_NAME.xml", shell=True) - else: - return "415 Unsupported Media Type ;)" - -if __name__ == '__main__': - app.run(debug=True,host='0.0.0.0') diff --git a/openvino/cat.bmp b/openvino/cat.bmp deleted file mode 100644 index a9f792f..0000000 Binary files a/openvino/cat.bmp and /dev/null differ diff --git a/openvino/classification.yaml b/openvino/classification.yaml deleted file mode 100644 index 6cb8628..0000000 --- a/openvino/classification.yaml +++ /dev/null @@ -1,84 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: server -data: - app.py: | - import subprocess - from flask import Flask, request - app = Flask(__name__) - - @app.route('/') - def classification_sample(): - return 'Classification sample' - - @app.route('/image', methods=['POST']) - def do_classification(): - if request.headers['Content-Type'] == 'application/octet-stream': - f = open('./image', 'wb') - f.write(request.data) - return subprocess.check_output("classification_sample_async -i ./image -m $MODEL_PATH/$MODEL_NAME.xml", shell=True) - else: - return "415 Unsupported Media Type ;)" - - if __name__ == '__main__': - app.run(debug=True, host='0.0.0.0') - ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: openvino-deploy - labels: - app: classification -spec: - replicas: 1 - selector: - matchLabels: - app: classification - template: - metadata: - labels: - app: classification - spec: - containers: - - name: classification - image: clearlinux/openvino - imagePullPolicy: IfNotPresent - env: -# - name: http_proxy -# value: -# - name: https_proxy -# value: - - name: MODEL_NAME - value: mobilenetv2-int8-tf-0001 - - name: MODEL_PRECISION - value: FP32 - args: - - "python3" - - "app.py" - ports: - - containerPort: 5000 - volumeMounts: - - name: server-py - mountPath: /app/app.py - subPath: app.py - volumes: - - name: server-py - configMap: - name: server - ---- - -apiVersion: v1 -kind: Service -metadata: - name: openvino-server -spec: - type: NodePort - ports: - - port: 5000 - nodePort: 30008 - selector: - app: classification diff --git a/openvino/demo.sh b/openvino/demo.sh deleted file mode 100755 index 837d33e..0000000 --- a/openvino/demo.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) 2018 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -classification_sample_async -i cat.bmp -m $MODEL_PATH/$MODEL_NAME.xml diff --git a/openvino/docker-compose-server.yml b/openvino/docker-compose-server.yml deleted file mode 100644 index a70de68..0000000 --- a/openvino/docker-compose-server.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '2' - -services: - openvino: - image: clearlinux/openvino:latest - environment: - http_proxy: $http_proxy - https_proxy: $https_proxy - MODEL_NAME: mobilenetv2-int8-tf-0001 - MODEL_PRECISION: FP32 - ports: - - "5000:5000" - volumes: - - "./app.py:/app/app.py" - command: "python3 app.py" - diff --git a/openvino/docker-compose.yml b/openvino/docker-compose.yml deleted file mode 100644 index 6c4defd..0000000 --- a/openvino/docker-compose.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '2' - -services: - openvino: - image: clearlinux/openvino:latest - environment: - http_proxy: $http_proxy - https_proxy: $https_proxy - MODEL_NAME: mobilenetv2-int8-tf-0001 - MODEL_PRECISION: FP32 - volumes: - - "./cat.bmp:/app/cat.bmp" - - "./demo.sh:/app/demo.sh" - command: "/app/demo.sh" - diff --git a/openvino/docker-entrypoint.sh b/openvino/docker-entrypoint.sh deleted file mode 100755 index b358651..0000000 --- a/openvino/docker-entrypoint.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/bash -source /app/set_model_path.sh - -echo "MODEL NAME: $MODEL_NAME" -echo "MODEL PRECISION: $MODEL_PRECISION" -echo "MODEL PATH: $MODEL_PATH" - -exec "$@" diff --git a/openvino/hooks/post_push b/openvino/hooks/post_push deleted file mode 100755 index 1e47e94..0000000 --- a/openvino/hooks/post_push +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -. ../docker-hooks.sh - -image="clearlinux/openvino" -package=dldt - -do_tag $image $package diff --git a/openvino/models.txt b/openvino/models.txt deleted file mode 100644 index 1b210c9..0000000 --- a/openvino/models.txt +++ /dev/null @@ -1,4 +0,0 @@ -face-detection-retail-0005 -facial-landmarks-35-adas-0002 -person-vehicle-bike-detection-crossroad-0078 -person-detection-retail-0013 diff --git a/openvino/requirements.txt b/openvino/requirements.txt deleted file mode 100644 index 8beb190..0000000 --- a/openvino/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -flask -redis -networkx==2.3 diff --git a/openvino/set_model_path.sh b/openvino/set_model_path.sh deleted file mode 100755 index 74d6d25..0000000 --- a/openvino/set_model_path.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# set -e - -# download model -model_dl() { - model-downloader --name $1 -o $MODEL_DIR && \ - model-converter --name $1 -d $MODEL_DIR -o $MODEL_DIR --mo $MO_PATH; \ -} - -# set model path -set_model_path() { - if [ "$MODEL_PRECISION" ]; then - MODEL_PATH=$(find $MODEL_DIR -name "$MODEL_NAME.xml" | grep $MODEL_PRECISION) - else - MODEL_PATH=$(find $MODEL_DIR -name "$MODEL_NAME.xml") - fi - - export MODEL_PATH=${MODEL_PATH%/*} -} - -# download models if not existed and set the model path -if [ "$MODEL_NAME" ]; then - set_model_path - - if [ -z "$MODEL_PATH" ]; then - model_dl $MODEL_NAME - set_model_path - fi -fi - -if [ -z "$MODEL_PATH" ]; then - echo "Wrong model $MODEL_NAME, couldn't set MODEL_PATH" -fi - diff --git a/stacks/README.md b/stacks/README.md deleted file mode 100644 index 721c065..0000000 --- a/stacks/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Intel System Stacks - -NOTE: This directory will be archived soon, we recommend you use the [Intel System Stacks repo](https://github.com/intel/stacks) instead. diff --git a/stacks/dars/README.md b/stacks/dars/README.md deleted file mode 100644 index 67e640c..0000000 --- a/stacks/dars/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Data Analytics Reference Stack - -This provides the Data Analytics Reference Stack. To offer more flexibility, -there are two versions of the Data Analytics Reference Stack: - -* A Clear Linux derived image optimized for [OpenBLAS](https://www.openblas.net/) -* A Clear Linux derived image optimized for Intel® Math Kernel Library [MKL](https://software.intel.com/en-us/mkl) - -Please see the folders in this level about the variants and how to build and use them. diff --git a/stacks/dars/mkl/Dockerfile b/stacks/dars/mkl/Dockerfile deleted file mode 100644 index 55162cf..0000000 --- a/stacks/dars/mkl/Dockerfile +++ /dev/null @@ -1,90 +0,0 @@ -FROM clearlinux:latest AS builder -ARG swupd_args - -# Move to latest Clear Linux release to ensure -# that the swupd command line arguments are -# correct -RUN swupd update --no-boot-update $swupd_args && \ - swupd bundle-add curl - -# Grab os-release info from the minimal base image so -# that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / - -# Install additional content in a target directory -# using the os version from the minimal base -RUN source /os-release && \ - mkdir /install_root \ - && swupd os-install -V ${VERSION_ID} \ - --path /install_root --statedir /swupd-state \ - --bundles=big-data-basic,cpio,os-core-update,which --no-boot-update \ - && rm -rf /install_root/var/lib/swupd/* - -# fetch MKL library and wrapper -RUN URL='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15816' && \ - MKL_VERSION='l_mkl_2019.5.281_online' && \ - mkdir /install_root/mkl /install_root/mkl_wrapper && \ - curl ${URL}/${MKL_VERSION}.tgz -o /install_root/mkl/${MKL_VERSION}.tgz && \ - tar -xvf /install_root/mkl/${MKL_VERSION}.tgz -C /install_root/mkl --strip-components=1 && \ - curl -L https://github.com/Intel-bigdata/mkl_wrapper_for_non_CDH/raw/master/mkl_wrapper.jar -o /install_root/mkl_wrapper/mkl_wrapper.jar && \ - curl -L https://github.com/Intel-bigdata/mkl_wrapper_for_non_CDH/raw/master/mkl_wrapper.so -o /install_root/mkl_wrapper/mkl_wrapper.so - -# For some Host OS configuration with redirect_dir on, -# extra data are saved on the upper layer when the same -# file exists on different layers. To minimize docker -# image size, remove the overlapped files before copy. -RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ -RUN find / os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true - -FROM clearlinux/os-core:latest -LABEL maintainer=otc-swstacks@intel.com - -ENV HOME=/root - -COPY --from=builder /install_root / -COPY --from=builder /install_root/mkl /mkl - -# Configure openjdk11 -ENV JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -# Environment variables to point to Hadoop, -# Spark and YARN installation and configuration -ENV HADOOP_HOME=/usr -ENV HADOOP_CONF_DIR=/etc/hadoop -ENV HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native -ENV HADOOP_DEFAULT_LIBEXEC_DIR=$HADOOP_HOME/libexec -ENV HADOOP_IDENT_STRING=root -ENV HADOOP_LOG_DIR=/var/log/hadoop -ENV HADOOP_PID_DIR=/var/log/hadoop/pid -ENV HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib/native" - -ENV HDFS_DATANODE_USER=root -ENV HDFS_NAMENODE_USER=root -ENV HDFS_SECONDARYNAMENODE_USER=root - -ENV SPARK_HOME=/usr/share/apache-spark -ENV SPARK_CONF_DIR=/etc/spark - -ENV YARN_RESOURCEMANAGER_USER=root -ENV YARN_NODEMANAGER_USER=root - -COPY dars.ld.so.conf /etc/ld.so.conf -COPY silent.cfg /mkl - -RUN /mkl/install.sh -s /mkl/silent.cfg && \ - ldconfig - -COPY --from=builder /install_root/mkl_wrapper/mkl_wrapper.* /opt/intel/mkl/wrapper/ - -RUN rm -rf /mkl_wrapper /mkl /tmp/* - -RUN mkdir -p /etc/spark /etc/hadoop && \ - cp /usr/share/defaults/hadoop/log4j.properties /etc/hadoop && \ - cp /usr/share/apache-spark/conf/log4j.properties.template /etc/spark/log4j.properties - -COPY spark_conf/* /etc/spark/ -COPY hadoop_conf/* /etc/hadoop/ - -CMD ["/bin/bash"] diff --git a/stacks/dars/mkl/README.md b/stacks/dars/mkl/README.md deleted file mode 100644 index e992b3b..0000000 --- a/stacks/dars/mkl/README.md +++ /dev/null @@ -1,635 +0,0 @@ -## Data Analytics Reference Stack with Intel® MKL - -[![](https://images.microbadger.com/badges/image/clearlinux/stacks-dars-mkl.svg)](http://microbadger.com/images/clearlinux/stacks-dars-mkl "Get your own image badge on microbadger.com") - -### Building Locally - -Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg - -```bash -docker build --no-cache -t clearlinux/stacks-dars-mkl . -``` - -### Build ARGs - -* `swupd_args` specifies [swupd update](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags passed to the update during build. - ->NOTE: An empty `swupd_args` will default to Clear Linux OS latest version. Consider this when building from the Dockerfile, as an OS update will be performed. The docker image in this registry was built and validated using version `30970`. - -### Running a DARS Container - -To run a container you must know the name of the image or hash of the image. The name is `clearlinux/stacks-dars-mkl` for MKL-based image. -The hash can be retrieved along with all imported images with the command: - -```bash -docker images -``` - -Now that you know the name of the image, you can run it: - -```bash -docker run --ulimit nofile=1000000:1000000 --name --network host --rm -i -t clearlinux/stacks-dars-mkl -``` - -or if you need to provide volume mappings as per your machines directory paths: - -```bash -docker run --ulimit nofile=1000000:1000000 --name -v /data/datad:/mnt/disk1/dars/mkl -v /data/datae:/mnt/disk2/dars/mkl --network host --rm -i -t clearlinux/stacks-dars-mkl -``` - -Please note that `/data/datad` and `/data/datae` are directories on the host machine while `/mnt/disk1/dars/mkl`, `/mnt/disk2/dars/mkl` are the mount points inside the container in the form of directories and are created on demand if they do not exist yet. -Also, for simplicity we provided --network as host, so host machine IP itself can be used to access container. - -The extra `--ulimit nofile` parameter is currently required in order to increase the -number of open files opened at certain point by the spark engine. - -## Java Requirements - -All of the DARS components are compiled on Open JDK11. Container will have preinstalled JDK11 at /usr/lib/jvm/java-1.11.0-openjdk/ and it has been set as the default java version. -It is worth mentioning that the containers also contain Open JDK8, but we won't needed on this setup. - -### **NOTE** - ->Since Clear Linux OS is a stateless system, you should never modify the files under the `/usr/share/defaults` directory. The software updater will overwrite those files. - -*** - ->In the Dockerfile it's been configured the most common environment variables for you. -For Apache Hadoop use `/etc/hadoop` as `HADOOP_CONF_DIR` folder. -For Apache Spark use `/etc/spark` as `SPARK_CONF_DIR` folder. - -*** - -## Single Node Hadoop Cluster Setup - -In this mode, all the daemons involved i.e. The DataNode, NameNode, TaskTracker and JobTracker run as Java processes on the same machine. This setup is useful for developing and testing Hadoop applications. - -The components of a Hadoop Cluster are described below: - -- **NameNode:** Manages HDFS storage. HDFS exposes a filesystem namespace and allows user data to be stored in files. Internally a file is split into one or more blocks and these blocks are stored in a set of DataNodes. - We will indicate that the NameNode runs in our localhost. Follow these steps to set it up correctly: - -- **DataNode:** is also known as Slave node, it is responsible for storing and managing the data in that node and responds to the NameNode for all filesystem operations. - -- **JobTracker:** is a master which creates and runs the job through tasktrackers. It also tracks resource availability and task lifecycle management. - -- **TaskTracker:** Manage the processing resources on each worker node and send status updates to the JobTracker periodically. - -### Configuration - -To setup a single node cluster we need to run a container from stacks-dars-mkl image: - -```bash -docker run --ulimit nofile=1000000:1000000 -ti --rm --network host clearlinux/stacks-dars-mkl -cp -r -n /usr/share/defaults/hadoop/* /etc/hadoop -``` - -## Inside the running container we need to edit hadoop configuration files as follows - -`/etc/hadoop/mapred-site.xml`: - -```bash - - - mapreduce.framework.name - yarn - - - - yarn.app.mapreduce.am.env - HADOOP_MAPRED_HOME=${HADOOP_HOME} - - - - mapreduce.map.env - HADOOP_MAPRED_HOME=${HADOOP_HOME} - - - - mapreduce.reduce.env - HADOOP_MAPRED_HOME=${HADOOP_HOME} - - -``` - -`/etc/hadoop/yarn-site.xml`: - -```bash - - - yarn.nodemanager.aux-services - mapreduce_shuffle - - - - yarn.nodemanager.auxservices.mapreduce.shuffle.class - org.apache.hadoop.mapred.ShuffleHandler - - -``` - -## Start Hadoop daemons - -1. Format the NameNode server using the following command: - -```bash -hdfs namenode -format -``` - -2. **Start Hadoop services** as indicated below: - -To start HDFS Namenode service : - -```bash -hdfs --daemon start namenode -``` - -To start HDFS Datanode service : - -```bash -hdfs --daemon start datanode -``` - -To start Yarn ResourceManager : - -```bash -yarn --daemon start resourcemanager -``` - -To start Yarn NodeManager : - -```bash -yarn --daemon start nodemanager -``` - -To start jobhistory service : - -```bash -mapred --daemon start historyserver -``` - -3. Verify the alive node(s) using the following command: - -```bash -yarn node -list 2 -``` - -Your output will look like: - -```bash -Total Nodes:1 - Node-Id Node-State Node-Http-Address Number-of-Running-Containers - :43489 RUNNING :8042 0 -``` - -### Run an example - -Run the Pi Calculator Example on Hadoop - -Hadoop comes packaged with a set of example applications. In the next example we will show how to use Hadoop to calculate Pi number. -The JAR file containing the compiled class can be found on your running DARS container at: `/usr/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.2.0.jar` - -```bash -hadoop jar /usr/share/hadoop/mapreduce/hadoop-mapreduce-examples-$(hadoop version | grep Hadoop | cut -d ' ' -f2).jar pi 16 100 -``` - -If the program runs correctly, you should see output similar to the following: - -```bash -Estimated value of Pi is 3.14159125000000000000 -``` - -*** - -## Single Node Spark Cluster Setup - -### Start the master server and a worker daemons - -1. Start the master server using: - -```bash -/usr/share/apache-spark/sbin/start-master.sh -``` - -2. Start the worker daemon and connect it to the master: - -```bash -/usr/share/apache-spark/sbin/start-slave.sh spark://$(hostname):7077 -``` - -3. You can open an internet browser to monitor and inspect Spark job executions. The web UI is available at the master’s IP address and port 8080: - -```bash -http://hostname:8080 -``` - -### Run an example - -Run the Pi Calculator Example on Spark - -```bash -spark-submit --class org.apache.spark.examples.SparkPi --master spark://$(hostname):7077 --deploy-mode client /usr/share/apache-spark/examples/jars/spark-examples_2.12-$(cat /usr/share/apache-spark/RELEASE | grep Spark | cut -d ' ' -f2).jar 100 -``` - -If the program runs correctly, you should see output similar to the following: - -```bash -Pi is roughly 3.1413871141387113 - -``` - -*** - -## Run the Pi Calculator Example on spark-shell - -```bash -root@86dafb0d7521~ $ spark-shell --conf "spark.hadoop.fs.defaultFS=file:///" -``` - -```bash -scala> import scala.math.random -import org.apache.spark._ -val conf = new SparkConf().setAppName("Spark Pi") -val sc = new SparkContext(conf) -val slices = 5 -val n = math.min(100000L * slices, Int.MaxValue).toInt -val xs = 1 until n -val rdd = sc.parallelize(xs, slices).setName("'Initial rdd'") -val sample = rdd.map { i => -val x = random * 2 - 1 -val y = random * 2 - 1 -(x, y) -}.setName("'Random points sample'") - -val inside = sample.filter { case (x, y) => (x * x + y * y < 1) }.setName("'Random points inside circle'") -val count = inside.count() -println("Pi is roughly " + 4.0 * count / n) -sc.stop() -``` - -*** - -## Run the Pi Calculator Example on pyspark - -```bash -root@86dafb0d7521~ $ pyspark --conf "spark.hadoop.fs.defaultFS=file:///" -``` - -```bash ->>> import random -NUM_SAMPLES = 100000000 -def inside(p): - x, y = random.random(), random.random() - return x*x + y*y < 1 - -count = sc.parallelize(range(0, NUM_SAMPLES)).filter(inside).count() -print ("Pi is roughly %f" % (4.0 * count / NUM_SAMPLES)) -``` - -*** - -## Deploy DARS on Kubernetes - -Many containerized workloads are deployed in clusters and orchestration software like Kubernetes, for this purpose it is provided a Dockerfile and an entrypoint script. - -### Prerequisites - -* A running Kubernetes cluster at version >= 1.6 with access configured to it using kubectl. -* You must have appropriate permissions to list, create, edit and delete pods in your cluster. -* The service account credentials used by the driver pods must be allowed to create pods, services and configmaps. -* You must have Kubernetes DNS configured in your cluster. - -1. For this will example use the following `Dockerfile`. Execute the following to create the file. - -```bash -cat > $(pwd)/Dockerfile << 'EOF' -ARG DERIVED_IMAGE -FROM ${DERIVED_IMAGE} - -RUN mkdir -p /etc/passwd /etc/pam.d /opt/spark/conf /opt/spark/work-dir - -RUN set -ex && \ - rm /bin/sh && \ - ln -sv /bin/bash /bin/sh && \ - touch /etc/pam.d/su \ - echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su && \ - chgrp root /etc/passwd && chmod ug+rw /etc/passwd - -RUN ln -s /usr/share/apache-spark/jars/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/bin/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/sbin/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/examples/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/kubernetes/tests/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/data/ /opt/spark/ && \ - ln -s /etc/spark/* /opt/spark/conf/ - -COPY entrypoint.sh /opt/ -ENV JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk -ENV PATH="${JAVA_HOME}/bin:${PATH}" -ENV SPARK_HOME /opt/spark -WORKDIR /opt/spark/work-dir -ENTRYPOINT [ "/opt/entrypoint.sh" ] -EOF -``` - -2. The Dockerfile require an entrypoint script, this allows to `spark-submit` interact with the container using given arguments. Create the `entrypoint.sh` file. - -```bash -cat > $(pwd)/entrypoint.sh << 'EOF' -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# echo commands to the terminal output -set -ex - -# Check whether there is a passwd entry for the container UID -myuid=$(id -u) -mygid=$(id -g) -# turn off -e for getent because it will return error code in anonymous uid case -set +e -uidentry=$(getent passwd $myuid) -set -e - -# If there is no passwd entry for the container UID, attempt to create one -if [ -z "$uidentry" ] ; then - if [ -w /etc/passwd ] ; then - echo "$myuid:x:$myuid:$mygid:anonymous uid:$SPARK_HOME:/bin/false" >> /etc/passwd - else - echo "Container ENTRYPOINT failed to add passwd entry for anonymous UID" - fi -fi - -SPARK_K8S_CMD="$1" -case "$SPARK_K8S_CMD" in - driver | driver-py | driver-r | executor) - shift 1 - ;; - "") - ;; - *) - echo "Non-spark-on-k8s command provided, proceeding in pass-through mode..." - exec /sbin/tini -s -- "$@" - ;; -esac - -SPARK_CLASSPATH="$SPARK_CLASSPATH:${SPARK_HOME}/jars/*" -env | grep SPARK_JAVA_OPT_ | sort -t_ -k4 -n | sed 's/[^=]*=\(.*\)/\1/g' > /tmp/java_opts.txt -readarray -t SPARK_EXECUTOR_JAVA_OPTS < /tmp/java_opts.txt - -if [ -n "$SPARK_EXTRA_CLASSPATH" ]; then - SPARK_CLASSPATH="$SPARK_CLASSPATH:$SPARK_EXTRA_CLASSPATH" -fi - -if [ -n "$PYSPARK_FILES" ]; then - PYTHONPATH="$PYTHONPATH:$PYSPARK_FILES" -fi - -PYSPARK_ARGS="" -if [ -n "$PYSPARK_APP_ARGS" ]; then - PYSPARK_ARGS="$PYSPARK_APP_ARGS" -fi - -R_ARGS="" -if [ -n "$R_APP_ARGS" ]; then - R_ARGS="$R_APP_ARGS" -fi - -if [ "$PYSPARK_MAJOR_PYTHON_VERSION" == "2" ]; then - pyv="$(python -V 2>&1)" - export PYTHON_VERSION="${pyv:7}" - export PYSPARK_PYTHON="python" - export PYSPARK_DRIVER_PYTHON="python" -elif [ "$PYSPARK_MAJOR_PYTHON_VERSION" == "3" ]; then - pyv3="$(python3 -V 2>&1)" - export PYTHON_VERSION="${pyv3:7}" - export PYSPARK_PYTHON="python3" - export PYSPARK_DRIVER_PYTHON="python3" -fi - -case "$SPARK_K8S_CMD" in - driver) - CMD=( - "$SPARK_HOME/bin/spark-submit" - --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" - --deploy-mode client - "$@" - ) - ;; - driver-py) - CMD=( - "$SPARK_HOME/bin/spark-submit" - --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" - --deploy-mode client - "$@" $PYSPARK_PRIMARY $PYSPARK_ARGS - ) - ;; - driver-r) - CMD=( - "$SPARK_HOME/bin/spark-submit" - --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" - --deploy-mode client - "$@" $R_PRIMARY $R_ARGS - ) - ;; - executor) - CMD=( - ${JAVA_HOME}/bin/java - "${SPARK_EXECUTOR_JAVA_OPTS[@]}" - -Xms$SPARK_EXECUTOR_MEMORY - -Xmx$SPARK_EXECUTOR_MEMORY - -cp "$SPARK_CLASSPATH" - org.apache.spark.executor.CoarseGrainedExecutorBackend - --driver-url $SPARK_DRIVER_URL - --executor-id $SPARK_EXECUTOR_ID - --cores $SPARK_EXECUTOR_CORES - --app-id $SPARK_APPLICATION_ID - --hostname $SPARK_EXECUTOR_POD_IP - ) - ;; - - *) - echo "Unknown command: $SPARK_K8S_CMD" 1>&2 - exit 1 -esac - -# Execute the container CMD -exec "${CMD[@]}" -EOF -``` - -3. Give execute permission to `entrypoint.sh` script. - -```bash -sudo chmod +x $(pwd)/entrypoint.sh -``` - -4. Build Image, for this example use `dars_k8s_spark` as name. - -```bash -docker build . --build-arg DERIVED_IMAGE=clearlinux/stacks-dars-mkl -t dars_k8s_spark -``` - -5. Verify your built image. Execute the following command looking for the given name `dars_k8s_spark` - -```bash -docker images | grep "dars_k8s_spark" -``` - -You should see something like: - -```bash -dars_k8s_spark latest 1fa3278a3421 1 minutes ago 6.56GB -``` - -6. Use a variable to store the image's given name: - -```bash -DARS_K8S_IMAGE=dars_k8s_spark -``` - -### Configure RBAC - -1. Create the spark service account and cluster role binding to allow Spark on Kubernetes create Executors as required. In this example use the `default` namespace. - -```bash -kubectl create serviceaccount spark-serviceaccount --namespace default -kubectl create clusterrolebinding spark-rolebinding --clusterrole=edit --serviceaccount=default:spark-serviceaccount --namespace=default -``` - -### Prepare to Submit Spark Job - -1. Determine the Kubernetes master address: - -```bash -kubectl cluster-info -``` - -You should see something like: - -```bash -Kubernetes master is running at https://192.168.39.127:8443 -``` - -2. Use a variable to store the master address: - -```bash -MASTER_ADDRESS='https://192.168.39.127:8443' -``` - -### Submit Spark Job on Minikube - -1. Execute following command using `MASTER_ADDRESS` and `DARS_K8S` variables. Driver pod will be called `spark-pi-driver`. - -More information about `spark-submit` configuration on [running-on-kubernetes documentation](https://spark.apache.org/docs/latest/running-on-kubernetes.html#configuration). - -```bash -spark-submit \ ---master k8s://${MASTER_ADDRESS} \ ---deploy-mode cluster \ ---name spark-pi \ ---class org.apache.spark.examples.SparkPi \ ---conf spark.executor.instances=2 \ ---conf spark.kubernetes.container.image=${DARS_K8S_IMAGE} \ ---conf spark.kubernetes.driver.pod.name=spark-pi-driver \ ---conf spark.kubernetes.namespace=default \ ---conf spark.kubernetes.authenticate.driver.serviceAccountName=spark-serviceaccount \ -local:///usr/share/apache-spark/examples/jars/spark-examples_2.12-2.4.0.jar -``` - -2. Check the Job. Read the logs and look for the Pi result: - -```bash -kubectl logs spark-pi-driver | grep "Pi is roughly" -``` - -You should see something like: - -```bash -Pi is roughly 3.1418957094785473 -``` - -*** - -## Kubernetes installation - -To install Kubernetes in Clear Linux, follow the instructions in the Clear Linux's [Kubernetes Tutorial](https://docs.01.org/clearlinux/latest/tutorials/kubernetes.html) - -## **FAQ** - -* Pyspark / Spark-shell drops `connection exception` or `Connection refused` this happens due HADOOP_CONF_DIR environment variable is set and these APIs are assuming will use Hadoop Distributed File System. -You can `unset HADOOP_CONF_DIR` and use Spark RDD, or start Hadoop services and then create your directories and files as you required using `hdfs`. - -Also it is possible to change the file system to local without `unset HADOOP_CONF_DIR` as is further described below: - -```bash -pyspark --conf "spark.hadoop.fs.defaultFS=file:///" -``` - -and - -```bash -spark-shell --conf "spark.hadoop.fs.defaultFS=file:///" -``` - -* How to set proxies in Spark: - -There is two ways to work with proxies: - -1. Add in $SPARK_CONF_DIR/spark-defaults.conf the following line for both `spark.executor.extraJavaOptions` and `spark.driver.extraJavaOptions` variables: - -```bash - -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort= - ``` - -e.g. - -```bash -# MKL flags -spark.executor.extraJavaOptions=-Dcom.github.fommil.netlib.BLAS=com.intel.mkl.MKLBLAS -Dcom.github.fommil.netlib.LAPACK=com.intel.mkl.MKLLAPACK -Dhttp.proxyHost=example.proxy -Dhttp.proxyPort=111 -Dhttps.proxyHost=example.proxy -Dhttps.proxyPort=112 - -spark.driver.extraJavaOptions=-Dcom.github.fommil.netlib.BLAS=com.intel.mkl.MKLBLAS -Dcom.github.fommil.netlib.LAPACK=com.intel.mkl.MKLLAPACK -Dhttp.proxyHost=example.proxy -Dhttp.proxyPort=111 -Dhttps.proxyHost=example.proxy -Dhttps.proxyPort=112 -``` - -2. Give as `conf` parameter the proxies URL and Port. - -e.g. - -```bash -pyspark --conf "spark.hadoop.fs.defaultFS=file:///" --conf "spark.driver.extraJavaOptions=-Dhttp.proxyHost=example.proxy -Dhttp.proxyPort=111 -Dhttps.proxyHost=example.proxy -Dhttps.proxyPort=112" -``` - -and - -```bash -spark-shell --conf "spark.hadoop.fs.defaultFS=file:///" --conf "spark.driver.extraJavaOptions=-Dhttp.proxyHost=example.proxy -Dhttp.proxyPort=111 -Dhttps.proxyHost=example.proxy -Dhttps.proxyPort=112" -``` - -*** - -#### Non functional known issues - -* spark-shell: - ->There is an exception message `Unrecognized Hadoop major version number: 3.2.0 at org.apache.hadoop.hive.shims.ShimLoader.getMajorVersion`. -This is not a problem, DARS is not using hadoop.hive.shims. -Hive binaries installed from [Apache](http://www.apache.org/dyn/closer.cgi/hive) on Clearlinux + JDK 11 does not work, this is an issue reported on [Jira's Hive](https://issues.apache.org/jira/browse/HIVE-21237) since February. - -* pyspark: - ->There is an exception message `Exception in thread "Thread-3" java.lang.ExceptionInInitializerError at org.apache.hadoop.hive.conf.HiveConf` -Hive binaries installed from [Apache](http://www.apache.org/dyn/closer.cgi/hive) on Clearlinux + JDK 11 does not work, this is an issue reported on [Jira's Hive](https://issues.apache.org/jira/browse/HIVE-21237) since February. diff --git a/stacks/dars/mkl/dars.ld.so.conf b/stacks/dars/mkl/dars.ld.so.conf deleted file mode 100644 index 24eaa80..0000000 --- a/stacks/dars/mkl/dars.ld.so.conf +++ /dev/null @@ -1,2 +0,0 @@ -/opt/intel/mkl/lib/intel64_lin -/opt/intel/lib/intel64_lin diff --git a/stacks/dars/mkl/hadoop_conf/core-site.xml b/stacks/dars/mkl/hadoop_conf/core-site.xml deleted file mode 100644 index e88f92a..0000000 --- a/stacks/dars/mkl/hadoop_conf/core-site.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - fs.defaultFS - hdfs://localhost:9000 - - \ No newline at end of file diff --git a/stacks/dars/mkl/hadoop_conf/hdfs-site.xml b/stacks/dars/mkl/hadoop_conf/hdfs-site.xml deleted file mode 100644 index 9133e39..0000000 --- a/stacks/dars/mkl/hadoop_conf/hdfs-site.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - dfs.replication - 1 - - \ No newline at end of file diff --git a/stacks/dars/mkl/hadoop_conf/mapred-site.xml b/stacks/dars/mkl/hadoop_conf/mapred-site.xml deleted file mode 100644 index ab03e51..0000000 --- a/stacks/dars/mkl/hadoop_conf/mapred-site.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - mapreduce.framework.name - yarn - - \ No newline at end of file diff --git a/stacks/dars/mkl/hadoop_conf/workers b/stacks/dars/mkl/hadoop_conf/workers deleted file mode 100644 index d18580b..0000000 --- a/stacks/dars/mkl/hadoop_conf/workers +++ /dev/null @@ -1 +0,0 @@ -localhost \ No newline at end of file diff --git a/stacks/dars/mkl/hadoop_conf/yarn-site.xml b/stacks/dars/mkl/hadoop_conf/yarn-site.xml deleted file mode 100644 index 087b33b..0000000 --- a/stacks/dars/mkl/hadoop_conf/yarn-site.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - yarn.nodemanager.aux-services - mapreduce_shuffle - - \ No newline at end of file diff --git a/stacks/dars/mkl/licenses/README.md b/stacks/dars/mkl/licenses/README.md deleted file mode 100644 index 18ad67d..0000000 --- a/stacks/dars/mkl/licenses/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Additional details on licenses - -As with all Docker images, these likely also contain other software which may -be under other licenses (such as Bash, etc from the base distribution, along -with any direct or indirect dependencies of the primary software being -contained). As for any pre-built image usage, it is the image user's -responsibility to ensure that any use of this image complies with any relevant -licenses for all software contained within. diff --git a/stacks/dars/mkl/licenses/clear_LICENSE b/stacks/dars/mkl/licenses/clear_LICENSE deleted file mode 100644 index 3f0c923..0000000 --- a/stacks/dars/mkl/licenses/clear_LICENSE +++ /dev/null @@ -1,147 +0,0 @@ - -List of licenses used in Clear Linux OS. - -This list is automatically generated. If you spot a mistake or -omission, please mention this on dev@lists.clearlinux.org. - -To read the full license text for these licenses, please visit -http://spdx.org/licenses/. A few licenses in this list are not -declared on the http://spdx.org/licenses/ website, they are listed -at the bottom of this list. - -AFL-2.0 -AFL-2.1 -AGPL-3.0 -AML -APSL-2.0 -Apache-1.1 -Apache-2.0 -Artistic-1.0 -Artistic-1.0-Perl -Artistic-2.0 -BSD-2-Clause -BSD-2-Clause-FreeBSD -BSD-2-Clause-NetBSD -BSD-3-Clause -BSD-3-Clause-Attribution -BSD-3-Clause-Clear -BSD-3-Clause-LBNL -BSD-4-Clause -BSD-4-Clause-UC -BSL-1.0 -CC-BY-2.0 -CC-BY-3.0 -CC-BY-4.0 -CC-BY-ND-4.0 -CC-BY-SA-2.0 -CC-BY-SA-3.0 -CC-BY-SA-4.0 -CC0-1.0 -CDDL-1.0 -CDDL-1.1 -CECILL-1.1 -CPL-1.0 -ClArtistic -Distributable -EPL-1.0 -FSFULLR -FTL -GFDL-1.1 -GFDL-1.2 -GFDL-1.3 -GFDL-1.3+ -GL2PS -GPL-1.0 -GPL-1.0+ -GPL-2.0 -GPL-2.0+ -GPL-2.0-only -GPL-2.0-or-later -GPL-3.0 -GPL-3.0+ -GPL-3.0-only -HPND -ICU -IJG -ISC -ImageMagick -Imlib2 -Intel -JSON -JasPer-2.0 -LAL-1.2 -LGPL-2.0 -LGPL-2.0+ -LGPL-2.1 -LGPL-2.1+ -LGPL-2.1-only -LGPL-3.0 -LGPL-3.0+ -LPPL-1.0 -LPPL-1.3c -Libpng -MIT -MIT-Opengroup -MIT-enna -MIT-feh -MPL-1.1 -MPL-2.0 -MPL-2.0-no-copyleft-exception -MS-PL -MTLL -MakeIndex -NCSA -NTP -NetCDF -Nunit -OFL-1.0 -OFL-1.1 -OLDAP-2.0.1 -OLDAP-2.8 -OML -OSL-2.0 -OpenSSL -PHP-3.01 -PostgreSQL -Public-Domain -Python-2.0 -QPL-1.0 -Qhull -Rdisc -Ruby -SAX-PD -SGI-B-1.0 -SGI-B-1.1 -SGI-B-2.0 -SISSL -Saxpath -Sleepycat -TCL -Unicode-TOU -Unlicense -Vim -W3C -W3C-19980720 -WTFPL -X11 -ZPL-2.0 -ZPL-2.1 -Zend-2.0 -Zlib -bzip2-1.0.5 -bzip2-1.0.6 -gnuplot -libtiff -psutils -zlib-acknowledgement - -The following licenses are not standard spdx identifiers: -- Copyright -- Distributable -- Public-Domain - -These are used for projects that have explicitly granted redistribution -of the project source code, but don't have a typical OSI approved -license identifier. - - diff --git a/stacks/dars/mkl/licenses/mkl_LICENSE b/stacks/dars/mkl/licenses/mkl_LICENSE deleted file mode 100644 index 817590f..0000000 --- a/stacks/dars/mkl/licenses/mkl_LICENSE +++ /dev/null @@ -1,41 +0,0 @@ -Copyright (c) 2018 Intel Corporation. - -Use and Redistribution. You may use and redistribute the software (the “Software”), without modification, provided the following conditions are met: - -* Redistributions must reproduce the above copyright notice and the following terms of use in the Software and in the documentation and/or other materials provided with the distribution. - -* Neither the name of Intel nor the names of its suppliers may be used to endorse or promote products derived from this Software without specific prior written permission. - -* No reverse engineering, decompilation, or disassembly of this Software is permitted. - -Limited patent license. Intel grants you a world-wide, royalty-free, non-exclusive license under patents it now or hereafter owns or controls to make, have made, use, import, offer to sell -and sell (“Utilize”) this Software, but solely to the extent that any such patent is necessary to Utilize the Software alone. The patent license shall not apply to any combinations which include -this software. No hardware per se is licensed hereunder. - -Third party and other Intel programs. “Third Party Programs” are the files listed in the “third-party-programs.txt” text file that is included with the Software and may include Intel programs under -separate license terms. Third Party Programs, even if included with the distribution of the Materials, are governed by separate license terms and those license terms solely govern your use of those programs. - -DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND -NON-INFRINGEMENT ARE DISCLAIMED. THIS SOFTWARE IS NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS WHERE FAILURE OF THE SOFTWARE MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE THAT YOU ARE FULLY -RESPONSIBLE FOR ANY CLAIMS, COSTS, DAMAGES, EXPENSES, AND ATTORNEYS’ FEES ARISING OUT OF ANY SUCH USE, EVEN IF ANY CLAIM ALLEGES THAT INTEL WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. - -LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. YOU AGREE TO INDEMNIFY AND HOLD INTEL HARMLESS AGAINST ANY CLAIMS AND EXPENSES RESULTING FROM -YOUR USE OR UNAUTHORIZED USE OF THE SOFTWARE. - -No support. Intel may make changes to the Software, at any time without notice, and is not obligated to support, update or provide training for the Software. - -Termination. Intel may terminate your right to use the Software in the event of your breach of this Agreement and you fail to cure the breach within a reasonable period of time. - -Feedback. Should you provide Intel with comments, modifications, corrections, enhancements or other input (“Feedback”) related to the Software Intel will be free to use, disclose, reproduce, -license or otherwise distribute or exploit the Feedback in its sole discretion without any obligations or restrictions of any kind, including without limitation, intellectual property rights or -licensing obligations. - -Compliance with laws. You agree to comply with all relevant laws and regulations governing your use, transfer, import or export (or prohibition thereof) of the Software. - -Governing law. All disputes will be governed by the laws of the United States of America and the State of Delaware without reference to conflict of law principles and subject to the exclusive -jurisdiction of the state or federal courts sitting in the State of Delaware, and each party agrees that it submits to the personal jurisdiction and venue of those courts and waives any objections. -The United Nations Convention on Contracts for the International Sale of Goods (1980) is specifically excluded and will not apply to the Software. - -*Other names and brands may be claimed as the property of others. \ No newline at end of file diff --git a/stacks/dars/mkl/silent.cfg b/stacks/dars/mkl/silent.cfg deleted file mode 100755 index 59dfe79..0000000 --- a/stacks/dars/mkl/silent.cfg +++ /dev/null @@ -1,37 +0,0 @@ -# Patterns used to check silent configuration file -# -# anythingpat - any string -# filepat - the file location pattern (/file/location/to/license.lic) -# lspat - the license server address pattern (0123@hostname) -# snpat - the serial number pattern (ABCD-01234567) - -# Accept EULA, valid values are: {accept, decline} -ACCEPT_EULA=accept - -# Optional error behavior, valid values are: {yes, no} -CONTINUE_WITH_OPTIONAL_ERROR=yes - -# Install location, valid values are: {/opt/intel, filepat} -PSET_INSTALL_DIR=/opt/intel - -# Continue with overwrite of existing installation directory, valid values are: {yes, no} -CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes - -# List of components to install, valid values are: {ALL, DEFAULTS, anythingpat} -COMPONENTS=DEFAULTS - -# Installation mode, valid values are: {install, repair, uninstall} -PSET_MODE=install - -# Directory for non-RPM database, valid values are: {filepat} -#NONRPM_DB_DIR=filepat - -# Path to the cluster description file, valid values are: {filepat} -#CLUSTER_INSTALL_MACHINES_FILE=filepat - -# Perform validation of digital signatures of RPM files, valid values are: {yes, no} -SIGNING_ENABLED=yes - -# Select target architecture of your applications, valid values are: {IA32, INTEL64, ALL} -ARCH_SELECTED=INTEL64 - diff --git a/stacks/dars/mkl/spark_conf/spark-defaults.conf b/stacks/dars/mkl/spark_conf/spark-defaults.conf deleted file mode 100644 index 8801cc9..0000000 --- a/stacks/dars/mkl/spark_conf/spark-defaults.conf +++ /dev/null @@ -1,3 +0,0 @@ -# MKL flags -spark.executor.extraJavaOptions=-Dcom.github.fommil.netlib.BLAS=com.intel.mkl.MKLBLAS -Dcom.github.fommil.netlib.LAPACK=com.intel.mkl.MKLLAPACK -spark.driver.extraJavaOptions=-Dcom.github.fommil.netlib.BLAS=com.intel.mkl.MKLBLAS -Dcom.github.fommil.netlib.LAPACK=com.intel.mkl.MKLLAPACK diff --git a/stacks/dars/mkl/spark_conf/spark-env.sh b/stacks/dars/mkl/spark_conf/spark-env.sh deleted file mode 100644 index ee32da8..0000000 --- a/stacks/dars/mkl/spark_conf/spark-env.sh +++ /dev/null @@ -1,2 +0,0 @@ -MKL_NUM_THREADS=1 -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/native \ No newline at end of file diff --git a/stacks/dars/openblas/Dockerfile b/stacks/dars/openblas/Dockerfile deleted file mode 100644 index a2916a3..0000000 --- a/stacks/dars/openblas/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -FROM clearlinux:latest AS builder -ARG swupd_args - -# Move to latest Clear Linux release to ensure -# that the swupd command line arguments are -# correct -RUN swupd update --no-boot-update $swupd_args - -# Grab os-release info from the minimal base image so -# that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / - -# Install additional content in a target directory -# using the os version from the minimal base -RUN source /os-release && \ - mkdir /install_root \ - && swupd os-install -V ${VERSION_ID} \ - --path /install_root --statedir /swupd-state \ - --bundles=big-data-basic,cpio,os-core-update,python-basic-dev,which --no-boot-update \ - && rm -rf /install_root/var/lib/swupd/* - -# For some Host OS configuration with redirect_dir on, -# extra data are saved on the upper layer when the same -# file exists on different layers. To minimize docker -# image size, remove the overlapped files before copy. -RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ -RUN find / os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true - -FROM clearlinux/os-core:latest -LABEL maintainer=otc-swstacks@intel.com - -ENV HOME=/root - -# Configure openjdk11 -ENV JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -# Environment variables to point to Hadoop, -# Spark and YARN installation and configuration -ENV HADOOP_HOME=/usr -ENV HADOOP_CONF_DIR=/etc/hadoop -ENV HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native -ENV HADOOP_DEFAULT_LIBEXEC_DIR=$HADOOP_HOME/libexec -ENV HADOOP_IDENT_STRING=root -ENV HADOOP_LOG_DIR=/var/log/hadoop -ENV HADOOP_PID_DIR=/var/log/hadoop/pid -ENV HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib/native" - -ENV HDFS_DATANODE_USER=root -ENV HDFS_NAMENODE_USER=root -ENV HDFS_SECONDARYNAMENODE_USER=root - -ENV SPARK_HOME=/usr/share/apache-spark -ENV SPARK_CONF_DIR=/etc/spark - -ENV YARN_RESOURCEMANAGER_USER=root -ENV YARN_NODEMANAGER_USER=root - -COPY --from=builder /install_root / - -COPY dars.ld.so.conf /etc/ld.so.conf - -RUN ldconfig - -RUN mkdir -p /etc/spark /etc/hadoop && \ - cp /usr/share/defaults/hadoop/log4j.properties /etc/hadoop && \ - cp /usr/share/apache-spark/conf/log4j.properties.template /etc/spark/log4j.properties - -COPY spark_conf/* /etc/spark/ -COPY hadoop_conf/* /etc/hadoop/ - -CMD ["/bin/bash"] diff --git a/stacks/dars/openblas/README.md b/stacks/dars/openblas/README.md deleted file mode 100644 index bde4b5e..0000000 --- a/stacks/dars/openblas/README.md +++ /dev/null @@ -1,635 +0,0 @@ -## Data Analytics Reference Stack with OpenBLAS - -[![](https://images.microbadger.com/badges/image/clearlinux/stacks-dars-openblas.svg)](http://microbadger.com/images/clearlinux/stacks-dars-openblas "Get your own image badge on microbadger.com") - -### Building Locally - -Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg - -```bash -docker build --no-cache -t clearlinux/stacks-dars-openblas . -``` - -### Build ARGs - -* `swupd_args` specifies [swupd update](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags passed to the update during build. - ->NOTE: An empty `swupd_args` will default to Clear Linux OS latest version. Consider this when building from the Dockerfile, as an OS update will be performed. The docker image in this registry was built and validated using version `30970`. - -### Running a DARS Container - -To run a container you must know the name of the image or hash of the image. The name is `clearlinux/stacks-dars-openblas` for MKL-based image. -The hash can be retrieved along with all imported images with the command: - -```bash -docker images -``` - -Now that you know the name of the image, you can run it: - -```bash -docker run --ulimit nofile=1000000:1000000 --name --network host --rm -i -t clearlinux/stacks-dars-openblas -``` - -or if you need to provide volume mappings as per your machines directory paths: - -```bash -docker run --ulimit nofile=1000000:1000000 --name -v /data/datad:/mnt/disk1/dars/oblas -v /data/datae:/mnt/disk2/dars/oblas --network host --rm -i -t clearlinux/stacks-dars-openblas -``` - -Please note that `/data/datad` and `/data/datae` are directories on the host machine while `/mnt/disk1/dars/mkl`, `/mnt/disk2/dars/oblas` are the mount points inside the container in the form of directories and are created on demand if they do not exist yet. -Also, for simplicity we provided --network as host, so host machine IP itself can be used to access container. - -The extra `--ulimit nofile` parameter is currently required in order to increase the -number of open files opened at certain point by the spark engine. - -## Java Requirements - -All of the DARS components are compiled on Open JDK11. Container will have preinstalled JDK11 at /usr/lib/jvm/java-1.11.0-openjdk/ and it has been set as the default java version. -It is worth mentioning that the containers also contain Open JDK8, but we won't needed on this setup. - -### **NOTE** - ->Since Clear Linux OS is a stateless system, you should never modify the files under the `/usr/share/defaults` directory. The software updater will overwrite those files. - -*** - ->In the Dockerfile it's been configured the most common environment variables for you. -For Apache Hadoop use `/etc/hadoop` as `HADOOP_CONF_DIR` folder. -For Apache Spark use `/etc/spark` as `SPARK_CONF_DIR` folder. - -*** - -## Single Node Hadoop Cluster Setup - -In this mode, all the daemons involved i.e. The DataNode, NameNode, TaskTracker and JobTracker run as Java processes on the same machine. This setup is useful for developing and testing Hadoop applications. - -The components of a Hadoop Cluster are described below: - -- **NameNode:** Manages HDFS storage. HDFS exposes a filesystem namespace and allows user data to be stored in files. Internally a file is split into one or more blocks and these blocks are stored in a set of DataNodes. - We will indicate that the NameNode runs in our localhost. Follow these steps to set it up correctly: - -- **DataNode:** is also known as Slave node, it is responsible for storing and managing the data in that node and responds to the NameNode for all filesystem operations. - -- **JobTracker:** is a master which creates and runs the job through tasktrackers. It also tracks resource availability and task lifecycle management. - -- **TaskTracker:** Manage the processing resources on each worker node and send status updates to the JobTracker periodically. - -### Configuration - -To setup a single node cluster we need to run a container from stacks-dars-openblas image: - -```bash -docker run --ulimit nofile=1000000:1000000 -ti --rm --network host clearlinux/stacks-dars-openblas -cp -r -n /usr/share/defaults/hadoop/* /etc/hadoop -``` - -## Inside the running container we need to edit hadoop configuration files as follows - -`/etc/hadoop/mapred-site.xml`: - -```bash - - - mapreduce.framework.name - yarn - - - - yarn.app.mapreduce.am.env - HADOOP_MAPRED_HOME=${HADOOP_HOME} - - - - mapreduce.map.env - HADOOP_MAPRED_HOME=${HADOOP_HOME} - - - - mapreduce.reduce.env - HADOOP_MAPRED_HOME=${HADOOP_HOME} - - -``` - -`/etc/hadoop/yarn-site.xml`: - -```bash - - - yarn.nodemanager.aux-services - mapreduce_shuffle - - - - yarn.nodemanager.auxservices.mapreduce.shuffle.class - org.apache.hadoop.mapred.ShuffleHandler - - -``` - -## Start Hadoop daemons - -1. Format the NameNode server using the following command: - -```bash -hdfs namenode -format -``` - -2. **Start Hadoop services** as indicated below: - -To start HDFS Namenode service : - -```bash -hdfs --daemon start namenode -``` - -To start HDFS Datanode service : - -```bash -hdfs --daemon start datanode -``` - -To start Yarn ResourceManager : - -```bash -yarn --daemon start resourcemanager -``` - -To start Yarn NodeManager : - -```bash -yarn --daemon start nodemanager -``` - -To start jobhistory service : - -```bash -mapred --daemon start historyserver -``` - -3. Verify the alive node(s) using the following command: - -```bash -yarn node -list 2 -``` - -Your output will look like: - -```bash -Total Nodes:1 - Node-Id Node-State Node-Http-Address Number-of-Running-Containers - :43489 RUNNING :8042 0 -``` - -### Run an example - -Run the Pi Calculator Example on Hadoop - -Hadoop comes packaged with a set of example applications. In the next example we will show how to use Hadoop to calculate Pi number. -The JAR file containing the compiled class can be found on your running DARS container at: `/usr/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.2.0.jar` - -```bash -hadoop jar /usr/share/hadoop/mapreduce/hadoop-mapreduce-examples-$(hadoop version | grep Hadoop | cut -d ' ' -f2).jar pi 16 100 -``` - -If the program runs correctly, you should see output similar to the following: - -```bash -Estimated value of Pi is 3.14159125000000000000 -``` - -*** - -## Single Node Spark Cluster Setup - -### Start the master server and a worker daemons - -1. Start the master server using: - -```bash -/usr/share/apache-spark/sbin/start-master.sh -``` - -2. Start the worker daemon and connect it to the master: - -```bash -/usr/share/apache-spark/sbin/start-slave.sh spark://$(hostname):7077 -``` - -3. You can open an internet browser to monitor and inspect Spark job executions. The web UI is available at the master’s IP address and port 8080: - -```bash -http://hostname:8080 -``` - -### Run an example - -Run the Pi Calculator Example on Spark - -```bash -spark-submit --class org.apache.spark.examples.SparkPi --master spark://$(hostname):7077 --deploy-mode client /usr/share/apache-spark/examples/jars/spark-examples_2.12-$(cat /usr/share/apache-spark/RELEASE | grep Spark | cut -d ' ' -f2).jar 100 -``` - -If the program runs correctly, you should see output similar to the following: - -```bash -Pi is roughly 3.1413871141387113 - -``` - -*** - -## Run the Pi Calculator Example on spark-shell - -```bash -root@86dafb0d7521~ $ spark-shell --conf "spark.hadoop.fs.defaultFS=file:///" -``` - -```bash -scala> import scala.math.random -import org.apache.spark._ -val conf = new SparkConf().setAppName("Spark Pi") -val sc = new SparkContext(conf) -val slices = 5 -val n = math.min(100000L * slices, Int.MaxValue).toInt -val xs = 1 until n -val rdd = sc.parallelize(xs, slices).setName("'Initial rdd'") -val sample = rdd.map { i => -val x = random * 2 - 1 -val y = random * 2 - 1 -(x, y) -}.setName("'Random points sample'") - -val inside = sample.filter { case (x, y) => (x * x + y * y < 1) }.setName("'Random points inside circle'") -val count = inside.count() -println("Pi is roughly " + 4.0 * count / n) -sc.stop() -``` - -*** - -## Run the Pi Calculator Example on pyspark - -```bash -root@86dafb0d7521~ $ pyspark --conf "spark.hadoop.fs.defaultFS=file:///" -``` - -```bash ->>> import random -NUM_SAMPLES = 100000000 -def inside(p): - x, y = random.random(), random.random() - return x*x + y*y < 1 - -count = sc.parallelize(range(0, NUM_SAMPLES)).filter(inside).count() -print ("Pi is roughly %f" % (4.0 * count / NUM_SAMPLES)) -``` - -*** - -## Deploy DARS on Kubernetes - -Many containerized workloads are deployed in clusters and orchestration software like Kubernetes, for this purpose it is provided a Dockerfile and an entrypoint script. - -### Prerequisites - -* A running Kubernetes cluster at version >= 1.6 with access configured to it using kubectl. -* You must have appropriate permissions to list, create, edit and delete pods in your cluster. -* The service account credentials used by the driver pods must be allowed to create pods, services and configmaps. -* You must have Kubernetes DNS configured in your cluster. - -1. For this will example use the following `Dockerfile`. Execute the following to create the file. - -```bash -cat > $(pwd)/Dockerfile << 'EOF' -ARG DERIVED_IMAGE -FROM ${DERIVED_IMAGE} - -RUN mkdir -p /etc/passwd /etc/pam.d /opt/spark/conf /opt/spark/work-dir - -RUN set -ex && \ - rm /bin/sh && \ - ln -sv /bin/bash /bin/sh && \ - touch /etc/pam.d/su \ - echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su && \ - chgrp root /etc/passwd && chmod ug+rw /etc/passwd - -RUN ln -s /usr/share/apache-spark/jars/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/bin/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/sbin/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/examples/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/kubernetes/tests/ /opt/spark/ && \ - ln -s /usr/share/apache-spark/data/ /opt/spark/ && \ - ln -s /etc/spark/* /opt/spark/conf/ - -COPY entrypoint.sh /opt/ -ENV JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk -ENV PATH="${JAVA_HOME}/bin:${PATH}" -ENV SPARK_HOME /opt/spark -WORKDIR /opt/spark/work-dir -ENTRYPOINT [ "/opt/entrypoint.sh" ] -EOF -``` - -2. The Dockerfile require an entrypoint script, this allows to `spark-submit` interact with the container using given arguments. Create the `entrypoint.sh` file. - -```bash -cat > $(pwd)/entrypoint.sh << 'EOF' -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# echo commands to the terminal output -set -ex - -# Check whether there is a passwd entry for the container UID -myuid=$(id -u) -mygid=$(id -g) -# turn off -e for getent because it will return error code in anonymous uid case -set +e -uidentry=$(getent passwd $myuid) -set -e - -# If there is no passwd entry for the container UID, attempt to create one -if [ -z "$uidentry" ] ; then - if [ -w /etc/passwd ] ; then - echo "$myuid:x:$myuid:$mygid:anonymous uid:$SPARK_HOME:/bin/false" >> /etc/passwd - else - echo "Container ENTRYPOINT failed to add passwd entry for anonymous UID" - fi -fi - -SPARK_K8S_CMD="$1" -case "$SPARK_K8S_CMD" in - driver | driver-py | driver-r | executor) - shift 1 - ;; - "") - ;; - *) - echo "Non-spark-on-k8s command provided, proceeding in pass-through mode..." - exec /sbin/tini -s -- "$@" - ;; -esac - -SPARK_CLASSPATH="$SPARK_CLASSPATH:${SPARK_HOME}/jars/*" -env | grep SPARK_JAVA_OPT_ | sort -t_ -k4 -n | sed 's/[^=]*=\(.*\)/\1/g' > /tmp/java_opts.txt -readarray -t SPARK_EXECUTOR_JAVA_OPTS < /tmp/java_opts.txt - -if [ -n "$SPARK_EXTRA_CLASSPATH" ]; then - SPARK_CLASSPATH="$SPARK_CLASSPATH:$SPARK_EXTRA_CLASSPATH" -fi - -if [ -n "$PYSPARK_FILES" ]; then - PYTHONPATH="$PYTHONPATH:$PYSPARK_FILES" -fi - -PYSPARK_ARGS="" -if [ -n "$PYSPARK_APP_ARGS" ]; then - PYSPARK_ARGS="$PYSPARK_APP_ARGS" -fi - -R_ARGS="" -if [ -n "$R_APP_ARGS" ]; then - R_ARGS="$R_APP_ARGS" -fi - -if [ "$PYSPARK_MAJOR_PYTHON_VERSION" == "2" ]; then - pyv="$(python -V 2>&1)" - export PYTHON_VERSION="${pyv:7}" - export PYSPARK_PYTHON="python" - export PYSPARK_DRIVER_PYTHON="python" -elif [ "$PYSPARK_MAJOR_PYTHON_VERSION" == "3" ]; then - pyv3="$(python3 -V 2>&1)" - export PYTHON_VERSION="${pyv3:7}" - export PYSPARK_PYTHON="python3" - export PYSPARK_DRIVER_PYTHON="python3" -fi - -case "$SPARK_K8S_CMD" in - driver) - CMD=( - "$SPARK_HOME/bin/spark-submit" - --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" - --deploy-mode client - "$@" - ) - ;; - driver-py) - CMD=( - "$SPARK_HOME/bin/spark-submit" - --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" - --deploy-mode client - "$@" $PYSPARK_PRIMARY $PYSPARK_ARGS - ) - ;; - driver-r) - CMD=( - "$SPARK_HOME/bin/spark-submit" - --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" - --deploy-mode client - "$@" $R_PRIMARY $R_ARGS - ) - ;; - executor) - CMD=( - ${JAVA_HOME}/bin/java - "${SPARK_EXECUTOR_JAVA_OPTS[@]}" - -Xms$SPARK_EXECUTOR_MEMORY - -Xmx$SPARK_EXECUTOR_MEMORY - -cp "$SPARK_CLASSPATH" - org.apache.spark.executor.CoarseGrainedExecutorBackend - --driver-url $SPARK_DRIVER_URL - --executor-id $SPARK_EXECUTOR_ID - --cores $SPARK_EXECUTOR_CORES - --app-id $SPARK_APPLICATION_ID - --hostname $SPARK_EXECUTOR_POD_IP - ) - ;; - - *) - echo "Unknown command: $SPARK_K8S_CMD" 1>&2 - exit 1 -esac - -# Execute the container CMD -exec "${CMD[@]}" -EOF -``` - -3. Give execute permission to `entrypoint.sh` script. - -```bash -sudo chmod +x $(pwd)/entrypoint.sh -``` - -4. Build Image, for this example use `dars_k8s_spark` as name. - -```bash -docker build . --build-arg DERIVED_IMAGE=clearlinux/stacks-dars-openblas -t dars_k8s_spark -``` - -5. Verify your built image. Execute the following command looking for the given name `dars_k8s_spark` - -```bash -docker images | grep "dars_k8s_spark" -``` - -You should see something like: - -```bash -dars_k8s_spark latest 1fa3278a3421 1 minutes ago 6.56GB -``` - -6. Use a variable to store the image's given name: - -```bash -DARS_K8S_IMAGE=dars_k8s_spark -``` - -### Configure RBAC - -1. Create the spark service account and cluster role binding to allow Spark on Kubernetes create Executors as required. In this example use the `default` namespace. - -```bash -kubectl create serviceaccount spark-serviceaccount --namespace default -kubectl create clusterrolebinding spark-rolebinding --clusterrole=edit --serviceaccount=default:spark-serviceaccount --namespace=default -``` - -### Prepare to Submit Spark Job - -1. Determine the Kubernetes master address: - -```bash -kubectl cluster-info -``` - -You should see something like: - -```bash -Kubernetes master is running at https://192.168.39.127:8443 -``` - -2. Use a variable to store the master address: - -```bash -MASTER_ADDRESS='https://192.168.39.127:8443' -``` - -### Submit Spark Job on Minikube - -1. Execute following command using `MASTER_ADDRESS` and `DARS_K8S` variables. Driver pod will be called `spark-pi-driver`. - -More information about `spark-submit` configuration on [running-on-kubernetes documentation](https://spark.apache.org/docs/latest/running-on-kubernetes.html#configuration). - -```bash -spark-submit \ ---master k8s://${MASTER_ADDRESS} \ ---deploy-mode cluster \ ---name spark-pi \ ---class org.apache.spark.examples.SparkPi \ ---conf spark.executor.instances=2 \ ---conf spark.kubernetes.container.image=${DARS_K8S_IMAGE} \ ---conf spark.kubernetes.driver.pod.name=spark-pi-driver \ ---conf spark.kubernetes.namespace=default \ ---conf spark.kubernetes.authenticate.driver.serviceAccountName=spark-serviceaccount \ -local:///usr/share/apache-spark/examples/jars/spark-examples_2.12-2.4.0.jar -``` - -2. Check the Job. Read the logs and look for the Pi result: - -```bash -kubectl logs spark-pi-driver | grep "Pi is roughly" -``` - -You should see something like: - -```bash -Pi is roughly 3.1418957094785473 -``` - -*** - -## Kubernetes installation - -To install Kubernetes in Clear Linux, follow the instructions in the Clear Linux's [Kubernetes Tutorial](https://docs.01.org/clearlinux/latest/tutorials/kubernetes.html) - -## **FAQ** - -* Pyspark / Spark-shell drops `connection exception` or `Connection refused` this happens due HADOOP_CONF_DIR environment variable is set and these APIs are assuming will use Hadoop Distributed File System. -You can `unset HADOOP_CONF_DIR` and use Spark RDD, or start Hadoop services and then create your directories and files as you required using `hdfs`. - -Also it is possible to change the file system to local without `unset HADOOP_CONF_DIR` as is further described below: - -```bash -pyspark --conf "spark.hadoop.fs.defaultFS=file:///" -``` - -and - -```bash -spark-shell --conf "spark.hadoop.fs.defaultFS=file:///" -``` - -* How to set proxies in Spark: - -There is two ways to work with proxies: - -1. Add in $SPARK_CONF_DIR/spark-defaults.conf the following line for both `spark.executor.extraJavaOptions` and `spark.driver.extraJavaOptions` variables: - -```bash - -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort= - ``` - -e.g. - -```bash -# OpenBlas confs -spark.executor.extraJavaOptions=-Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.NativeSystemBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.NativeSystemLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.NativeSystemARPACK -Dhttp.proxyHost=example.proxy -Dhttp.proxyPort=111 -Dhttps.proxyHost=example.proxy -Dhttps.proxyPort=112 - -spark.driver.extraJavaOptions=-Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.NativeSystemBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.NativeSystemLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.NativeSystemARPACK -Dhttp.proxyHost=example.proxy -Dhttp.proxyPort=111 -Dhttps.proxyHost=example.proxy -Dhttps.proxyPort=112 -``` - -2. Give as `conf` parameter the proxies URL and Port. - -e.g. - -```bash -pyspark --conf "spark.hadoop.fs.defaultFS=file:///" --conf "spark.driver.extraJavaOptions=-Dhttp.proxyHost=example.proxy -Dhttp.proxyPort=111 -Dhttps.proxyHost=example.proxy -Dhttps.proxyPort=112" -``` - -and - -```bash -spark-shell --conf "spark.hadoop.fs.defaultFS=file:///" --conf "spark.driver.extraJavaOptions=-Dhttp.proxyHost=example.proxy -Dhttp.proxyPort=111 -Dhttps.proxyHost=example.proxy -Dhttps.proxyPort=112" -``` - -*** - -#### Non functional known issues - -* spark-shell: - ->There is an exception message `Unrecognized Hadoop major version number: 3.2.0 at org.apache.hadoop.hive.shims.ShimLoader.getMajorVersion`. -This is not a problem, DARS is not using hadoop.hive.shims. -Hive binaries installed from [Apache](http://www.apache.org/dyn/closer.cgi/hive) on Clearlinux + JDK 11 does not work, this is an issue reported on [Jira's Hive](https://issues.apache.org/jira/browse/HIVE-21237) since February. - -* pyspark: - ->There is an exception message `Exception in thread "Thread-3" java.lang.ExceptionInInitializerError at org.apache.hadoop.hive.conf.HiveConf` -Hive binaries installed from [Apache](http://www.apache.org/dyn/closer.cgi/hive) on Clearlinux + JDK 11 does not work, this is an issue reported on [Jira's Hive](https://issues.apache.org/jira/browse/HIVE-21237) since February. diff --git a/stacks/dars/openblas/dars.ld.so.conf b/stacks/dars/openblas/dars.ld.so.conf deleted file mode 100644 index 01215a3..0000000 --- a/stacks/dars/openblas/dars.ld.so.conf +++ /dev/null @@ -1 +0,0 @@ -/usr/lib64/haswell/avx512_1 diff --git a/stacks/dars/openblas/hadoop_conf/core-site.xml b/stacks/dars/openblas/hadoop_conf/core-site.xml deleted file mode 100644 index e88f92a..0000000 --- a/stacks/dars/openblas/hadoop_conf/core-site.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - fs.defaultFS - hdfs://localhost:9000 - - \ No newline at end of file diff --git a/stacks/dars/openblas/hadoop_conf/hdfs-site.xml b/stacks/dars/openblas/hadoop_conf/hdfs-site.xml deleted file mode 100644 index 9133e39..0000000 --- a/stacks/dars/openblas/hadoop_conf/hdfs-site.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - dfs.replication - 1 - - \ No newline at end of file diff --git a/stacks/dars/openblas/hadoop_conf/mapred-site.xml b/stacks/dars/openblas/hadoop_conf/mapred-site.xml deleted file mode 100644 index ab03e51..0000000 --- a/stacks/dars/openblas/hadoop_conf/mapred-site.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - mapreduce.framework.name - yarn - - \ No newline at end of file diff --git a/stacks/dars/openblas/hadoop_conf/workers b/stacks/dars/openblas/hadoop_conf/workers deleted file mode 100644 index d18580b..0000000 --- a/stacks/dars/openblas/hadoop_conf/workers +++ /dev/null @@ -1 +0,0 @@ -localhost \ No newline at end of file diff --git a/stacks/dars/openblas/hadoop_conf/yarn-site.xml b/stacks/dars/openblas/hadoop_conf/yarn-site.xml deleted file mode 100644 index 087b33b..0000000 --- a/stacks/dars/openblas/hadoop_conf/yarn-site.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - yarn.nodemanager.aux-services - mapreduce_shuffle - - \ No newline at end of file diff --git a/stacks/dars/openblas/licenses/README.md b/stacks/dars/openblas/licenses/README.md deleted file mode 100644 index 18ad67d..0000000 --- a/stacks/dars/openblas/licenses/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Additional details on licenses - -As with all Docker images, these likely also contain other software which may -be under other licenses (such as Bash, etc from the base distribution, along -with any direct or indirect dependencies of the primary software being -contained). As for any pre-built image usage, it is the image user's -responsibility to ensure that any use of this image complies with any relevant -licenses for all software contained within. diff --git a/stacks/dars/openblas/licenses/clear_LICENSE b/stacks/dars/openblas/licenses/clear_LICENSE deleted file mode 100644 index 3f0c923..0000000 --- a/stacks/dars/openblas/licenses/clear_LICENSE +++ /dev/null @@ -1,147 +0,0 @@ - -List of licenses used in Clear Linux OS. - -This list is automatically generated. If you spot a mistake or -omission, please mention this on dev@lists.clearlinux.org. - -To read the full license text for these licenses, please visit -http://spdx.org/licenses/. A few licenses in this list are not -declared on the http://spdx.org/licenses/ website, they are listed -at the bottom of this list. - -AFL-2.0 -AFL-2.1 -AGPL-3.0 -AML -APSL-2.0 -Apache-1.1 -Apache-2.0 -Artistic-1.0 -Artistic-1.0-Perl -Artistic-2.0 -BSD-2-Clause -BSD-2-Clause-FreeBSD -BSD-2-Clause-NetBSD -BSD-3-Clause -BSD-3-Clause-Attribution -BSD-3-Clause-Clear -BSD-3-Clause-LBNL -BSD-4-Clause -BSD-4-Clause-UC -BSL-1.0 -CC-BY-2.0 -CC-BY-3.0 -CC-BY-4.0 -CC-BY-ND-4.0 -CC-BY-SA-2.0 -CC-BY-SA-3.0 -CC-BY-SA-4.0 -CC0-1.0 -CDDL-1.0 -CDDL-1.1 -CECILL-1.1 -CPL-1.0 -ClArtistic -Distributable -EPL-1.0 -FSFULLR -FTL -GFDL-1.1 -GFDL-1.2 -GFDL-1.3 -GFDL-1.3+ -GL2PS -GPL-1.0 -GPL-1.0+ -GPL-2.0 -GPL-2.0+ -GPL-2.0-only -GPL-2.0-or-later -GPL-3.0 -GPL-3.0+ -GPL-3.0-only -HPND -ICU -IJG -ISC -ImageMagick -Imlib2 -Intel -JSON -JasPer-2.0 -LAL-1.2 -LGPL-2.0 -LGPL-2.0+ -LGPL-2.1 -LGPL-2.1+ -LGPL-2.1-only -LGPL-3.0 -LGPL-3.0+ -LPPL-1.0 -LPPL-1.3c -Libpng -MIT -MIT-Opengroup -MIT-enna -MIT-feh -MPL-1.1 -MPL-2.0 -MPL-2.0-no-copyleft-exception -MS-PL -MTLL -MakeIndex -NCSA -NTP -NetCDF -Nunit -OFL-1.0 -OFL-1.1 -OLDAP-2.0.1 -OLDAP-2.8 -OML -OSL-2.0 -OpenSSL -PHP-3.01 -PostgreSQL -Public-Domain -Python-2.0 -QPL-1.0 -Qhull -Rdisc -Ruby -SAX-PD -SGI-B-1.0 -SGI-B-1.1 -SGI-B-2.0 -SISSL -Saxpath -Sleepycat -TCL -Unicode-TOU -Unlicense -Vim -W3C -W3C-19980720 -WTFPL -X11 -ZPL-2.0 -ZPL-2.1 -Zend-2.0 -Zlib -bzip2-1.0.5 -bzip2-1.0.6 -gnuplot -libtiff -psutils -zlib-acknowledgement - -The following licenses are not standard spdx identifiers: -- Copyright -- Distributable -- Public-Domain - -These are used for projects that have explicitly granted redistribution -of the project source code, but don't have a typical OSI approved -license identifier. - - diff --git a/stacks/dars/openblas/profile b/stacks/dars/openblas/profile deleted file mode 100644 index 516c403..0000000 --- a/stacks/dars/openblas/profile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/bash - -# Configure openjdk11 - -export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk -export PATH="${JAVA_HOME}/bin:${PATH}" - diff --git a/stacks/dars/openblas/spark_conf/spark-defaults.conf b/stacks/dars/openblas/spark_conf/spark-defaults.conf deleted file mode 100644 index 4ea99cf..0000000 --- a/stacks/dars/openblas/spark_conf/spark-defaults.conf +++ /dev/null @@ -1,3 +0,0 @@ -# OpenBlas confs -spark.executor.extraJavaOptions=-Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.NativeSystemBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.NativeSystemLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.NativeSystemARPACK -spark.driver.extraJavaOptions=-Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.NativeSystemBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.NativeSystemLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.NativeSystemARPACK diff --git a/stacks/dars/openblas/spark_conf/spark-env.sh b/stacks/dars/openblas/spark_conf/spark-env.sh deleted file mode 100644 index bb21bd8..0000000 --- a/stacks/dars/openblas/spark_conf/spark-env.sh +++ /dev/null @@ -1,2 +0,0 @@ -OPENBLAS_NUM_THREADS=1 -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/native \ No newline at end of file diff --git a/stacks/dars/releasenote.md b/stacks/dars/releasenote.md deleted file mode 100644 index 4605ea8..0000000 --- a/stacks/dars/releasenote.md +++ /dev/null @@ -1,66 +0,0 @@ - -# Data Analytics Reference Stack - -The Data Analytics Reference Stack, is an integrated, highly-performant stack optimized for Intel® Xeon® Scalable platforms. This open source community release is part of an effort to ensure enterprises have easy access to all features and functionality of Intel platforms. - -Highly-tuned and built for enterprises, the release enables application developers and architects a powerful way to store and process large amounts of data using a distributed processing framework to efficiently build big-data solutions and solve domain-specific problems. Having a streamlined system stack frees users from the complexity of integrating multiple components and software versions, and delivers a stable, performant platform upon which to quickly develop, test, and deploy solutions. - -The stack includes tuned software components across the operating system (Clear Linux OS), Runtimes (Open Java Development Kit* (OpenJDK)), Math Libraries (Intel ® Math Kernel Library (MKL), open source Basic Linear Algebra Subprograms (OpenBLAS)), frameworks (Apache Hadoop*, Apache Spark*), and other software components. - -> **Note:** -Clear Linux will be automatically updated to the latest release version in the container. The minimum validated version of Clear Linux for this stack is 30970. - -## Stack Features - -The Data Analytics Reference Stack provides two pre-built Docker images, available on Docker Hub: - -A Clear Linux OS-derived [DARS with OpenBlas](https://hub.docker.com/r/clearlinux/stacks-dars-openblas) stack optimized for [OpenBLAS](http://www.openblas.net) -A Clear Linux OS-derived [DARS with Intel® MKL](https://hub.docker.com/r/clearlinux/stacks-dars-mkl) stack optimized for [MKL](https://software.intel.com/en-us/mkl) (Intel® Math Kernel Library) - -## The Data Analytics Reference Stack with MKL - -The release includes: - * Clear Linux* OS - * Apache Spark 2.4.0 - * Apache Hadoop 3.2.0 - * OpenJDK 11.0.4 - * Intel® Math Kernel Library 2019 [Update 5](https://software.intel.com/en-us/articles/intel-math-kernel-library-release-notes-and-new-features) - -## The Data Analytics Reference Stack with OpenBLAS - -The release includes: - * Clear Linux* OS - * Apache Spark 2.4.0 - * Apache Hadoop 3.2.0 - * OpenJDK 11.0.4 - * OpenBLAS 0.3.6 - -# Licensing - -The Data Analytics Reference Stack is guided by the same [Terms of Use](https://download.clearlinux.org/TermsOfUse.html) declared by the Clear Linux project. The Docker images are hosted on https://hub.docker.com and as with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc. from the base distribution, along with any direct or indirect dependencies of the primary software being contained). - -# Working with the Data Analytics Reference Stack - -The images can be used in a Kubernetes cluster as a multi-node environment. Please see the [Data Analytics Reference Stack documentation](https://docs.01.org/clearlinux/latest/guides/stacks/dars.html) to get detailed instructions. -Please refer to the [Data Analytics Reference Stack tutorial](https://clearlinux.org/documentation/clear-linux/tutorials/dars) for detailed instructions for running the benchmarks on the docker images. - -# Contributing to the Database Reference Stack - -We encourage your contributions to this project, through the established Clear Linux community tools. Our team uses typical open source collaboration tools that are described on the Clear Linux [community page](https://clearlinux.org/community). - -# Reporting Security Issues - - If you have discovered potential security vulnerability in an Intel product, please contact the iPSIRT at secure@intel.com. - - It is important to include the following details: - - * The products and versions affected - * Detailed description of the vulnerability - * Information on known exploits - - Vulnerability information is extremely sensitive. The iPSIRT strongly recommends that all security vulnerability reports sent to Intel be encrypted using the iPSIRT PGP key. The PGP key is available here: https://www.intel.com/content/www/us/en/security-center/pgp-public-key.html - - Software to encrypt messages may be obtained from: - - * PGP Corporation - * GnuPG diff --git a/stacks/dbrs/README.md b/stacks/dbrs/README.md deleted file mode 100644 index ab1928e..0000000 --- a/stacks/dbrs/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Database Reference Stack - -This provides the Database Reference Stack. To offer more flexibility, there are multiple versions of the Database Reference Stack: - - * Cassandra optimized image featuring support for Intel® Optane™ DC persistent memory - * Redis optimized image featuring support for Intel® Optane™ DC persistent memory - -Please see the folders in this level about the variants and how to build and use them. \ No newline at end of file diff --git a/stacks/dbrs/cassandra/Dockerfile b/stacks/dbrs/cassandra/Dockerfile deleted file mode 100644 index c072ee2..0000000 --- a/stacks/dbrs/cassandra/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -FROM clearlinux/stacks-clearlinux:latest - -RUN swupd bundle-add curl java-runtime python2-basic which pmdk sudo - -RUN mkdir workspace -COPY scripts/docker-entrypoint.sh /usr/local/bin/ -COPY scripts/docker-healthcheck /usr/local/bin/ -COPY scripts/change_fsdax_perms.sh /usr/local/bin/ -COPY scripts/change_devdax_perms.sh /usr/local/bin/ -COPY scripts/change_persistent_dirs_perms.sh /usr/local/bin/ - -#Adding sudo in order to take ownership of PMEM devices, sudoers file should be deleted -#once the permissions are granted on docker-entrypoint.sh -RUN useradd cassandra-user && \ - mkdir -p /etc/sudoers.d && \ - echo 'cassandra-user ALL=(root) NOPASSWD: /usr/local/bin/change_fsdax_perms.sh,/usr/local/bin/change_devdax_perms.sh,/usr/local/bin/change_persistent_dirs_perms.sh' > /etc/sudoers.d/cassandra-user - -RUN chown root:root /usr/local/bin/change_fsdax_perms.sh && \ - chmod 755 /usr/local/bin/change_fsdax_perms.sh && \ - chown root:root /usr/local/bin/change_devdax_perms.sh && \ - chmod 755 /usr/local/bin/change_devdax_perms.sh && \ - chown root:root /usr/local/bin/change_persistent_dirs_perms.sh && \ - chmod 755 /usr/local/bin/change_persistent_dirs_perms.sh - - -COPY cassandra-pmem-build.tar.gz /tmp -RUN cd /tmp && \ - tar zxvf cassandra-pmem-build.tar.gz && \ - mkdir -p /workspace/cassandra/build && \ - cp -r /tmp/cassandra/bin /workspace/cassandra && \ - cp -r /tmp/cassandra/conf /workspace/cassandra && \ - cp -r /tmp/cassandra/lib /workspace/cassandra && \ - cp -r /tmp/cassandra/pylib /workspace/cassandra && \ - cp -r /tmp/cassandra/tools /workspace/cassandra && \ - cp -r /tmp/cassandra/build/classes /workspace/cassandra/build && \ - cp /tmp/cassandra/build/apache-cassandra-4.0-alpha2-SNAPSHOT.jar /workspace/cassandra/build && \ - cd /workspace && \ - rm -rf /tmp/cassandra && \ - rm /tmp/cassandra-pmem-build.tar.gz && \ - chown root:root -R /workspace && \ - mkdir /workspace/cassandra/data && \ - mkdir /workspace/cassandra/logs && \ - chown cassandra-user -R /workspace/cassandra/data && \ - chown cassandra-user -R /workspace/cassandra/logs && \ - chmod 0755 /workspace/cassandra/bin/* && \ - rm -rf /workspace/cassandra/lib/sigar-bin/*.dll && \ - rm -rf /workspace/cassandra/lib/sigar-bin/*.lib && \ - rm /workspace/cassandra/conf/cassandra.yaml && \ - rm /workspace/cassandra/conf/jvm-server.options && \ - rm /workspace/cassandra/conf/jvm8-server.options && \ - rm /workspace/cassandra/conf/jvm11-server.options - - -COPY conf/cassandra-template.yaml /workspace/cassandra/conf/ -COPY conf/jvm-server.options-template /workspace/cassandra/conf/ -COPY conf/jvm8-server.options /workspace/cassandra/conf/ -COPY conf/jvm11-server.options /workspace/cassandra/conf/ -RUN chown cassandra-user -R /workspace/cassandra/conf/ - -RUN swupd bundle-remove curl -RUN swupd clean - -HEALTHCHECK --interval=30s CMD ["docker-healthcheck"] - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] -USER cassandra-user -CMD ["/workspace/cassandra/bin/cassandra", "-f"] diff --git a/stacks/dbrs/cassandra/README.md b/stacks/dbrs/cassandra/README.md deleted file mode 100644 index 465383d..0000000 --- a/stacks/dbrs/cassandra/README.md +++ /dev/null @@ -1,302 +0,0 @@ -## Database Reference Stack with Cassandra - -[![](https://images.microbadger.com/badges/image/clearlinux/stacks-dbrs-cassandra.svg)](http://microbadger.com/images/clearlinux/stacks-dbrs-cassandra "Get your own image badge on microbadger.com") - -### Building Locally - -The Dockerfiles for all Clear Linux* OS based container images are available at [dockerfiles repository](https://github.com/clearlinux/dockerfiles). These can be used to build and modify the container images. - -1. Clone the clearlinux/dockerfiles repository. - - ```bash - git clone https://github.com/clearlinux/dockerfiles.git - ``` - -2. Change to the directory of the application: - - ```bash - cd dockerfiles/stacks/dbrs/cassandra - ``` - -3. Inside this repository there is a file called `scripts/build-cassandra-pmem.sh`, this script handles all the required procedures in rder to have cassandra-pmem compiled and ready for Dockerfile usage. The dependencies for this build can be installed with `swupd`. - - ```bash - swupd bundle-add c-basic java-basic devpkg-pmdk pmdk - ``` - -4. Once installed, we run the script - - ```bash - ./scripts/build-cassandra-pmem.sh - ``` - -5. If everything runs sucessfully you will have a file called `cassandra-pmem-build.tar.gz` on the directory on which you run the script, this file should be placed in the same directory of the Dockerfile for this one to be able to build the docker image sucesfully. Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg - - ```bash - docker build --no-cache -t clearlinux/stacks-dbrs-cassandra . - ``` - -### Run DBRS Cassandra as a standalone container - -- PMEM memory in `devdax` or `fsdax` mode, the container image is able to handle both modes and depending on the PMEM mode, the mount points inside the container should be different. - -In order to make available `devdax` pmem devices inside the container you must use the `--device` directive, internally the container always uses `/dev/dax0.0`, so the mapping should be: - -``` ---device=/dev/:/dev/dax0.0 -``` - -In a similar fashion for `fsdax` we need the device to be mapped to `/mnt/pmem` inside the container: - -``` ---mount type=bind,source=,target=/mnt/pmem -``` - -#### Preparing PMEM for container use - -In the current state, the cassandra-pmem image is capable of using both `fsdax` and `devdax`, the necessary steps to configure the PMEM to work with cassandra are documented here. - -##### fsdax mode - -First we need to verify that our PMEM is on `fsdax` mode - -``` -# ndctl list -u -{ - "dev":"namespace0.0", - "mode":"fsdax", - "map":"mem", - "size":"4.00 GiB (4.29 GB)", - "sector_size":512, - "blockdev":"pmem0" -} -``` - -if for some reason the device is not on `fsdax` mode you can run `ndctl create-namespace -fe --mode=fsdax` to reconfigure the namespace to the desired mode. -Once the PMEM namespace is configured, a device named `/dev/pmem{0-9}` should appear then we need to proceed to create a filesystem on it. The filesystem could be `ext4` or `xfs`, for this example we are going to use `ext4`. - -``` -# mkfs.ext4 /dev/pmem0 -mke2fs 1.45.2 (27-May-2019) -Creating filesystem with 1031680 4k blocks and 258048 inodes -Filesystem UUID: 303c03f5-ac4e-4462-8bf9-bc6b0fae53fe -Superblock backups stored on blocks: - 32768, 98304, 163840, 229376, 294912, 819200, 884736 - -Allocating group tables: done -Writing inode tables: done -Creating journal (16384 blocks): done -Writing superblocks and filesystem accounting information: done -``` - -Once the filesystem was created, we need to mount it with the dax option - -```bash -mount /dev/pmem0 /mnt/pmem -o dax -``` - -When using `fsdax` mode cassandra-pmem creates a pool file on the pmem mountpoint, so the `jvm.options` configuration should look like the text below: - -``` --Dpmem_path=/mnt/pmem/cassandra_pool --Dpool_size=3221225472 -``` - -Where - -- pmem_path is the path to the pool file, which should include the path itself and the file name -- pool_size is the size of the pool file in bytes, if you are using the docker images provided here you can pass this value as an environment variable to the container runtime in Gb and the calculation is done automatically. - -Is important to notice is that when creating the filesystem in the pmem device certain amount of space of the device is used by the filesystem metadata so the pool_size should be smaller than the total pmem namespace size. -When using the docker image provided here, the file `jvm.options` is automatically populated with the environment variables `CASSANDRA_PMEM_POOL_NAME` and `CASSANDRA_FSDAX_POOL_SIZE_GB`. - -##### devdax mode - -We need to verify if the device we want to use is in `devdax` mode - -``` -root@clear-pmem/home/development # ndctl create-namespace -fe namespace0.0 --mode=devdax -{ - "dev":"namespace0.0", - "mode":"devdax", - "map":"dev", - "size":"3.94 GiB (4.23 GB)", - "uuid":"cb738cc7-711d-4578-bebf-1f7ba02ca169", - "daxregion":{ - "id":0, - "size":"3.94 GiB (4.23 GB)", - "align":2097152, - "devices":[ - { - "chardev":"dax0.0", - "size":"3.94 GiB (4.23 GB)" - } - ] - }, - "align":2097152 -} -``` - -if not, we can reconfigure it using `ndctl create-namespace -fe --mode=devdax`. Before using a `devdax` device we need to clear the device: - -``` -root@clear-pmem/home/development # pmempool rm -vaf /dev/dax0.0 -removed '/dev/dax0.0' -``` - -The `jvm.options` configuration for cassandra should look like the following: -``` --Dpmem_path=/dev/dax0.0 --Dpool_size=0 -``` - -Where - -- pmem_path is the `devdax` device. -- pool_size=0 indicates to use the entire `devdax` device. - -When using the docker image provided here, the file `jvm.options` is automatically populated. - -#### Start container - -In `devdax` mode: - -```bash -docker run --device=/:/dev/dax0.0 --ulimit nofile=262144:262144 -p 9042:9042 -p 7000:7000 -it --name cassandra-test -``` - -In `fsdax` mode: - -```bash -docker run --mount type=bind,source=/,target=/mnt/pmem --ulimit nofile=262144:262144 -p 9042:9042 -p 7000:7000 -it -e 'CASSANDRA_FSDAX_POOL_SIZE_GB=' --name cassandra-test -``` - -#### Configure container - -##### Using environment variables - -By default the container listens on the primary container IP address, but if required, some parameters can be provided as environment variables using `--env`. - -| **Environment Variable** | **Description** | -| --- | --- | -| `CASSANDRA_CLUSTER_NAME` | Cassandra cluster name, by default `Cassandra Cluster` | -| `CASSANDRA_LISTEN_ADDRESS` | Cassandra listen address | -| `CASSANDRA_RPC_ADDRESS` | Cassandra RPC address | -| `CASSANDRA_SEED_ADDRESSES` | A comma separated list of hosts in the cluster, if not provided, cassandra is going to run as a single node. | -| `CASSANDRA_SNITCH` | The snitch type for the cluster, by default it is `SimpleSnitch`, for more complex snitches you can mount your own `cassandra-rackdc.properties` file. | -| `LOCAL_JMX` | If set to `no` the JMX service will listen on all IP addresses, the default is `yes` and listens just on localhost 127.0.0.1 | -| `JVM_OPTS` | When set you can pass additional arguments to the JVM for cassandra execution, for example for specifying memory heap sizes `JVM_OPTS=-Xms16G -Xmx16G -Xmn12G` | - -When using PMEM in `fsdax` mode, there are some parameters to control the allocation of memory: - -| Environment Variable | Description | -| --- | --- | -| `CASSANDRA_FSDAX_POOL_SIZE_GB` | The size of the fsdax pool in GB, if it is not specified the pool size is `1` | -| `CASSANDRA_PMEM_POOL_NAME` | The filename of the pool created in PMEM, by default `cassandra_pool` | - -##### Using custom files - -For more complex deployments it is also possible to provide custom `cassandra.yaml` and `jvm.options` files as shown below: - -``` -docker run --mount type=bind,source=/,target=/mnt/pmem -it --ulimit nofile=262144:262144 --mount type=bind,source=//cassandra.yaml,target=/workspace/cassandra/conf/cassandra.yaml --mount type=bind,source=/path-to-file>/jvm.options,target=/workspace/cassandra/conf/jvm.options --name cassandra-custom-files -``` - -#### Clustering - -For a simple two node cluster using PMEM in `fsdax` mode on both containers: - -##### Node 1 - -- IP: 172.17.0.2 -- PMEM mountpoint: /mnt/pmem1 - -``` -docker run --mount type=bind,source=/mnt/pmem1,target=/mnt/pmem --ulimit nofile=262144:262144 -it -e 'CASSANDRA_FSDAX_POOL_SIZE_GB=2' -e 'CASSANDRA_SEED_ADDRESSES=172.17.0.2:7000,172.17.0.3:7000' --name cassandra-node1 -``` - -##### Node 2 - -- IP: 172.17.0.3 -- PMEM mountpoint: /mnt/pmem2 - -``` -docker run --mount type=bind,source=/mnt/pmem2,target=/mnt/pmem --ulimit nofile=262144:262144 -it -e 'CASSANDRA_FSDAX_POOL_SIZE_GB=2' -e 'CASSANDRA_SEED_ADDRESSES=172.17.0.2:7000,172.17.0.3:7000' --name cassandra-node2 -``` - -Once both nodes are running eventually the gossip is settled and we can use `nodetool` on any of both containers to check cluster status. - -``` -docker exec -it bash /workspace/cassandra/bin/nodetool status -``` - -The output should look similar to this: - -``` -Datacenter: datacenter1 -======================= -Status=Up/Down -|/ State=Normal/Leaving/Joining/Moving --- Address Load Tokens Owns (effective) Host ID Rack -UN 172.17.0.3 0 bytes 256 100.0% 22387159-8192-41cf-8b6c-8bf0e1049eb7 rack1 -UN 172.17.0.2 0 bytes 256 100.0% 219b56ba-c07c-400b-a018-a5dc20edeb09 rack1 - -``` - -#### Data persistence - -By default the data written to cassandra can be accessed as long as the container exists. In order to persist the data a user can mount volumes or bind mounts on `/workspace/cassandra/data` and `/workspace/cassandra/logs`, in this way the data can still be accessed once the container is deleted. - -### Deploy DBRS Cassandra cluster on Kubernetes - -Many containerized workloads are deployed in clusters and orchestration software like Kubernetes, for this purpose the Helm chart located on `cassandra-pmem-helm` can be useful. - -#### Kubernetes installation - -To install Kubernetes in Clear Linux, follow the instructions in the Clear Linux's [Kubernetes Tutorial](https://docs.01.org/clearlinux/latest/tutorials/kubernetes.html) - -After setting up Kubernetes, you will need to enable it to support DCPMM suing the pmem-csi driver. To install the driver follow the instructions in the [pmem-csi repository](https://github.com/intel/pmem-csi) file. - -Then Kubernetes cluster must have [helm and tiller](https://helm.sh/) installed in order for the helm chart to deploy. - -#### Helm chart configuration - -In order to configure the cassandra pmem cluster some variables and values are provided. This values are set on `cassandra-pmem-helm/values.yaml`, those can also be modified according to your specific needs. A summary of those parameters is shown below: - -| **Value** | **Description** | -| --- | --- | -| clusterName | The cluster Name set across all deployed nodes | -| replicaCount | The number of nodes in the cluster to be deployed | -| image.repository | The address of the container registry where the cassandra-pmem image should be pulled | -| image.tag | The tag of the image to be pulled during deployment | -| image.name | The name of the image to be pulled during deployment | -| pmem.containerPmemAllocation | The size of the persistent volume claim to be used as heap, it uses the storage class `pmem-csi-sc-ext4` from pmem-csi | -| pmem.fsdaxPoolSizeInGB | The size of the fsdax pool to be created inside the persistent volume claim, in practice it shuld be `1G` less than pmem.containerPmemAllocation | -| enablePersistence | If set to `true` K8s persistent volumes are deployed to store data and logs | -| persistentVolumes.logsVolumeSize | The size of the persistent volume used for storing logs on each node, the default is `4G` | -| persistentVolumes.dataVolumeSize | The size of the persistent volume used for storing data on each node, the default is `4G` | -| persistentVolumes.logsStorageClass | K8s storage class used by the logs pvc | -| persistentVolumes.dataStorageClass | K8s storage class used by the data pvc | -| provideCustomConfig | If set to `true`, it mounts all the files located on `/files/conf` on `/workspace/cassandra/conf` inside each container in order to provide a way to customize the deployment beyond the options provided here | -| exposeJmxPort | When set to `true` it exposes the JMX port as part of the kubernetes headless service, it should be used together with `enableAdditionalFilesConfigMap` in order to provide authentication files needed for JMX when the remote connections are allowed, when set to `false` only local access through 127.0.0.1 is granted and no additional authentication is needed | -| enableClientToolsPod | If set to `true`, an additional pod independent from the cluster is deployed, this pod contains various Cassandra client tools and mounts test profiles located under `/files/testProfiles` to `/testProfiles` inside the pod. This pod is useful to test and launch benchmarks | -| enableAdditionalFilesConfigMap | When set to true, it takes the files located in `/files/additionalFiles` and mount them in `/etc/cassandra` inside the pods, some additional files for cassandra can be stored here, such as JMX auth files | -| jvmOpts.enabled | If set to `true` the environment variable `JVM_OPTS` is overriden with the value provided on jvmOpts.value | -| jvmOpts.value | Sets the value of the environment variable `JVM_OPTS`, in this way some java runtime configurations can be provided such as RAM heap usage | -| resources.enabled | if set to `true`, the resource constraints are set on each pod using the values under resources.requests and resources.limits | -| resources.requests.memory and resources.request.cpu | Initial resource allocation for each pod in the cluster | -| resources.limits.memory and resources.limits.cpu | Limits for cpu and memory for each pod in the cluster | - -** **Important considerations when selecting volume sizes** ** - -When selecting the `fsdax` pool file size, it is important to consider that when requesting a volume, certain amount of space is used by the filesystem metadata on that volume, therefore the available space turns out to be less than total amount specified, taking this into consideration the size of the fsdax pool file should be ~2G less than the total volume size requested. - -#### Helm chart deployment - -Once all the configurations are set, to install the chart inside a given Kubernetes cluster you must run: - -```bash -helm install ./cassandra-pmem-helm -``` - -Eventually all the given nodes will be shown as running using `kubectl get pods`. diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/.helmignore b/stacks/dbrs/cassandra/cassandra-pmem-helm/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/Chart.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/Chart.yaml deleted file mode 100644 index f6d352a..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for deploying Cassandra PMEM on K8s -name: cassandra-pmem-helm -version: 0.1.0 diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/additionalFiles/jmxremote.access b/stacks/dbrs/cassandra/cassandra-pmem-helm/files/additionalFiles/jmxremote.access deleted file mode 100644 index 8e12856..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/additionalFiles/jmxremote.access +++ /dev/null @@ -1,2 +0,0 @@ -monitorRole readonly -controlRole readwrite diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/additionalFiles/jmxremote.password b/stacks/dbrs/cassandra/cassandra-pmem-helm/files/additionalFiles/jmxremote.password deleted file mode 100644 index 3b4ec9b..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/additionalFiles/jmxremote.password +++ /dev/null @@ -1,3 +0,0 @@ -##Role password -monitorRole testpass -controlRole testpass diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/conf/README.md b/stacks/dbrs/cassandra/cassandra-pmem-helm/files/conf/README.md deleted file mode 100644 index 32c2303..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/conf/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Configuration files -When using `provideCustomConfig: true` in values.yaml, the files included in this directory are mounted as config files inside the pod, so -more complex configurations can be provided. diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/README.md b/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/README.md deleted file mode 100644 index 3c054bc..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Test profiles -When using `enableClientToolsPod: true` in values.yaml, the test profiles located in this directory are mounted on `/testProfiles` inside the pod. diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-counter-example.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-counter-example.yaml deleted file mode 100644 index 2430e50..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-counter-example.yaml +++ /dev/null @@ -1,78 +0,0 @@ -# -# This is an example YAML profile for cassandra-stress -# -# insert data -# cassandra-stress user profile=/home/jake/stress1.yaml ops(insert=1) -# -# read, using query simple1: -# cassandra-stress profile=/home/jake/stress1.yaml ops(simple1=1) -# -# mixed workload (90/10) -# cassandra-stress user profile=/home/jake/stress1.yaml ops(insert=1,simple1=9) - - -# -# Keyspace info -# -keyspace: stresscql - -# -# The CQL for creating a keyspace (optional if it already exists) -# -keyspace_definition: | - CREATE KEYSPACE stresscql WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; - -# -# Table info -# -table: counttest - -# -# The CQL for creating a table you wish to stress (optional if it already exists) -# -table_definition: | - CREATE TABLE counttest ( - name text PRIMARY KEY, - count counter - ) WITH comment='A table of many types to test wide rows' - -# -# Optional meta information on the generated columns in the above table -# The min and max only apply to text and blob types -# The distribution field represents the total unique population -# distribution of that column across rows. Supported types are -# -# EXP(min..max) An exponential distribution over the range [min..max] -# EXTREME(min..max,shape) An extreme value (Weibull) distribution over the range [min..max] -# GAUSSIAN(min..max,stdvrng) A gaussian/normal distribution, where mean=(min+max)/2, and stdev is (mean-min)/stdvrng -# GAUSSIAN(min..max,mean,stdev) A gaussian/normal distribution, with explicitly defined mean and stdev -# UNIFORM(min..max) A uniform distribution over the range [min, max] -# FIXED(val) A fixed distribution, always returning the same value -# SEQ(min..max) A fixed sequence, returning values in the range min to max sequentially (starting based on seed), wrapping if necessary. -# Aliases: extr, gauss, normal, norm, weibull -# -# If preceded by ~, the distribution is inverted -# Defaults for all columns are size: uniform(4..8), population: uniform(1..100B), cluster: fixed(1) -# - -columnspec: - - name: name - size: uniform(1..4) - - name: count - population: fixed(1) - -insert: - partitions: fixed(1) # number of unique partitions to update in a single operation - # if batchcount > 1, multiple batches will be used but all partitions will - # occur in all batches (unless they finish early); only the row counts will vary - batchtype: LOGGED # type of batch to use - select: fixed(1)/1 # uniform chance any single generated CQL row will be visited in a partition; - # generated for each partition independently, each time we visit it - -# -# A list of queries you wish to run against the schema -# -queries: - simple1: - cql: select * from counttest where name = ? - fields: samerow # samerow or multirow (select arguments from the same row, or randomly from all rows in the partition) \ No newline at end of file diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-example.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-example.yaml deleted file mode 100644 index cde345a..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-example.yaml +++ /dev/null @@ -1,109 +0,0 @@ -# -# This is an example YAML profile for cassandra-stress -# -# insert data -# cassandra-stress user profile=/home/jake/stress1.yaml ops(insert=1) -# -# read, using query simple1: -# cassandra-stress profile=/home/jake/stress1.yaml ops(simple1=1) -# -# mixed workload (90/10) -# cassandra-stress user profile=/home/jake/stress1.yaml ops(insert=1,simple1=9) - - -# -# Keyspace info -# -keyspace: stresscql - -# -# The CQL for creating a keyspace (optional if it already exists) -# -keyspace_definition: | - CREATE KEYSPACE stresscql WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; - -# -# Table info -# -table: typestest - -# -# The CQL for creating a table you wish to stress (optional if it already exists) -# -table_definition: | - CREATE TABLE typestest ( - name text, - choice boolean, - date timestamp, - address inet, - dbl double, - lval bigint, - ival int, - uid timeuuid, - value blob, - PRIMARY KEY((name,choice), date, address, dbl, lval, ival, uid) - ) - WITH compaction = { 'class':'LeveledCompactionStrategy' } -# AND compression = { 'sstable_compression' : '' } -# AND comment='A table of many types to test wide rows' - -# -# Optional meta information on the generated columns in the above table -# The min and max only apply to text and blob types -# The distribution field represents the total unique population -# distribution of that column across rows. Supported types are -# -# EXP(min..max) An exponential distribution over the range [min..max] -# EXTREME(min..max,shape) An extreme value (Weibull) distribution over the range [min..max] -# GAUSSIAN(min..max,stdvrng) A gaussian/normal distribution, where mean=(min+max)/2, and stdev is (mean-min)/stdvrng -# GAUSSIAN(min..max,mean,stdev) A gaussian/normal distribution, with explicitly defined mean and stdev -# UNIFORM(min..max) A uniform distribution over the range [min, max] -# FIXED(val) A fixed distribution, always returning the same value -# SEQ(min..max) A fixed sequence, returning values in the range min to max sequentially (starting based on seed), wrapping if necessary. -# Aliases: extr, gauss, normal, norm, weibull -# -# If preceded by ~, the distribution is inverted -# -# Defaults for all columns are size: uniform(4..8), population: uniform(1..100B), cluster: fixed(1) -# -columnspec: - - name: name - size: uniform(1..10) - population: uniform(1..10) # the range of unique values to select for the field (default is 100Billion) - - name: date - cluster: uniform(20..40) - - name: lval - population: gaussian(1..1000) - cluster: uniform(1..4) - -insert: - partitions: uniform(1..50) # number of unique partitions to update in a single operation - # if batchcount > 1, multiple batches will be used but all partitions will - # occur in all batches (unless they finish early); only the row counts will vary - batchtype: LOGGED # type of batch to use - select: uniform(1..10)/10 # uniform chance any single generated CQL row will be visited in a partition; - # generated for each partition independently, each time we visit it - -# -# A list of queries you wish to run against the schema -# -queries: - simple1: - cql: select * from typestest where name = ? and choice = ? LIMIT 100 - fields: samerow # samerow or multirow (select arguments from the same row, or randomly from all rows in the partition) - range1: - cql: select * from typestest where name = ? and choice = ? and date >= ? LIMIT 100 - fields: multirow # samerow or multirow (select arguments from the same row, or randomly from all rows in the partition) - - -# -# A list of bulk read queries that analytics tools may perform against the schema -# Each query will sweep an entire token range, page by page. -# -token_range_queries: - all_columns_tr_query: - columns: '*' - page_size: 5000 - - value_tr_query: - columns: value diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-insanity-example.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-insanity-example.yaml deleted file mode 100644 index 5eb4fec..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-insanity-example.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# -# This is an example YAML profile for cassandra-stress -# -# insert data -# cassandra-stress user profile=/home/jake/stress1.yaml ops(insert=1) -# -# read, using query simple1: -# cassandra-stress profile=/home/jake/stress1.yaml ops(simple1=1) -# -# mixed workload (90/10) -# cassandra-stress user profile=/home/jake/stress1.yaml ops(insert=1,simple1=9) - - -# -# Keyspace info -# -keyspace: stresscql - -# -# The CQL for creating a keyspace (optional if it already exists) -# -keyspace_definition: | - CREATE KEYSPACE stresscql WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; - -# -# Table info -# -table: insanitytest - -# -# The CQL for creating a table you wish to stress (optional if it already exists) -# -table_definition: | - CREATE TABLE insanitytest ( - name text, - choice boolean, - date timestamp, - address inet, - dbl double, - lval bigint, - fval float, - ival int, - uid timeuuid, - value blob, - PRIMARY KEY((name, choice), date) - ) WITH compaction = { 'class':'LeveledCompactionStrategy' } - AND comment='A table of many types to test wide rows and collections' - -# -# Optional meta information on the generated columns in the above table -# The min and max only apply to text and blob types -# The distribution field represents the total unique population -# distribution of that column across rows. Supported types are -# -# EXP(min..max) An exponential distribution over the range [min..max] -# EXTREME(min..max,shape) An extreme value (Weibull) distribution over the range [min..max] -# GAUSSIAN(min..max,stdvrng) A gaussian/normal distribution, where mean=(min+max)/2, and stdev is (mean-min)/stdvrng -# GAUSSIAN(min..max,mean,stdev) A gaussian/normal distribution, with explicitly defined mean and stdev -# UNIFORM(min..max) A uniform distribution over the range [min, max] -# FIXED(val) A fixed distribution, always returning the same value -# SEQ(min..max) A fixed sequence, returning values in the range min to max sequentially (starting based on seed), wrapping if necessary. -# Aliases: extr, gauss, normal, norm, weibull -# -# If preceded by ~, the distribution is inverted -# -# Defaults for all columns are size: uniform(4..8), population: uniform(1..100B), cluster: fixed(1) -# -columnspec: - - name: date - cluster: gaussian(1..20) - - name: lval - population: fixed(1) - - -insert: - partitions: fixed(1) # number of unique partitions to update in a single operation - # if batchcount > 1, multiple batches will be used but all partitions will - # occur in all batches (unless they finish early); only the row counts will vary - batchtype: LOGGED # type of batch to use - select: fixed(1)/1 # uniform chance any single generated CQL row will be visited in a partition; - # generated for each partition independently, each time we visit it - -# -# A list of queries you wish to run against the schema -# -queries: - simple1: - cql: select * from insanitytest where name = ? and choice = ? LIMIT 100 - fields: samerow # samerow or multirow (select arguments from the same row, or randomly from all rows in the partition) diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-lwt-example.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-lwt-example.yaml deleted file mode 100644 index 8f523be..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/files/testProfiles/cqlstress-lwt-example.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# Based on https://gist.github.com/tjake/8995058fed11d9921e31 -### DML ### - -# Keyspace Name -keyspace: cqlstress_lwt_example - -# The CQL for creating a keyspace (optional if it already exists) -keyspace_definition: | - CREATE KEYSPACE cqlstress_lwt_example WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 3}; - -# Table name -table: blogposts - -# The CQL for creating a table you wish to stress (optional if it already exists) -table_definition: | - CREATE TABLE blogposts ( - domain text, - published_date timeuuid, - url text, - author text, - title text, - body text, - PRIMARY KEY(domain, published_date) - ) WITH CLUSTERING ORDER BY (published_date DESC) - AND compaction = { 'class':'LeveledCompactionStrategy' } - AND comment='A table to hold blog posts' - -### Column Distribution Specifications ### - -columnspec: - - name: domain - size: gaussian(5..100) #domain names are relatively short - population: uniform(1..10M) #10M possible domains to pick from - - - name: published_date - cluster: fixed(1000) #under each domain we will have max 1000 posts - - - name: url - size: uniform(30..300) - - - name: title #titles shouldn't go beyond 200 chars - size: gaussian(10..200) - - - name: author - size: uniform(5..20) #author names should be short - - - name: body - size: gaussian(100..5000) #the body of the blog post can be long - -### Batch Ratio Distribution Specifications ### - -insert: - partitions: fixed(1) # Our partition key is the domain so only insert one per batch - - select: fixed(1)/1000 # We have 1000 posts per domain so 1/1000 will allow 1 post per batch - - batchtype: UNLOGGED # Unlogged batches - - condition: IF body = NULL # LWT: Do not override - - -# -# A list of queries you wish to run against the schema -# -queries: - singlepost: - cql: select * from blogposts where domain = ? LIMIT 1 - fields: samerow - timeline: - cql: select url, title, published_date from blogposts where domain = ? LIMIT 10 - fields: samerow diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/additionalFilesConfigMap.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/additionalFilesConfigMap.yaml deleted file mode 100644 index 36b7bde..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/additionalFilesConfigMap.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if and (.Files.Glob "files/additionalFiles/*") (.Values.enableAdditionalFilesConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Release.Name }}-additional-files-configmap - labels: - app: {{printf "%s-%s" .Release.Name .Values.appLabelSuffix }} -data: - {{ (.Files.Glob "files/additionalFiles/*").AsConfig | nindent 2 }} -{{- end }} - diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/clientToolsPodDeployment.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/clientToolsPodDeployment.yaml deleted file mode 100644 index c9d31f3..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/clientToolsPodDeployment.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.enableClientToolsPod }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-client-tools-pod - labels: - {{- $appLabel := printf "%s-%s" .Release.Name .Values.appLabelSuffix }} - app: {{ $appLabel }} -spec: - replicas: 1 - selector: - matchLabels: - app: {{ $appLabel }} - template: - metadata: - labels: - app: {{ $appLabel }} - spec: - containers: - - name: {{ .Release.Name }}-client-tools-pod - image: {{ .Values.clientToolsImage.repository }}/{{ .Values.clientToolsImage.image }}:{{ .Values.clientToolsImage.tag }} - volumeMounts: - - name: test-profiles-volume - mountPath: /testProfiles - volumes: - - name: test-profiles-volume - configMap: - name: {{ .Release.Name }}-test-profiles-configmap -{{- end }} diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/configMap.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/configMap.yaml deleted file mode 100644 index 279abb8..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/configMap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{- if and (.Files.Glob "files/conf/*") (.Values.provideCustomConfig) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Release.Name }}-configmap - labels: - app: {{printf "%s-%s" .Release.Name .Values.appLabelSuffix }} -data: - {{ (.Files.Glob "files/conf/*").AsConfig | nindent 2 }} -{{- end }} diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/headlessService.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/headlessService.yaml deleted file mode 100644 index 466cbcf..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/headlessService.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - {{- $serviceName := printf "%s-cassandra-pmem-svc" .Release.Name }} - name: {{ $serviceName }} - labels: - {{- $appLabel := printf "%s-%s" .Release.Name .Values.appLabelSuffix }} - app: {{ $appLabel }} -spec: - ports: - - port: 9042 - name: cql - - port: 7000 - name: inter-node - {{- if .Values.exposeJmxPort }} - - port: 7199 - name: jmx-port - {{- end }} - clusterIP: None - selector: - app: {{ $appLabel }} diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/service.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/service.yaml deleted file mode 100644 index 4579aac..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/service.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.exposeClusterExternally }} -apiVersion: v1 -kind: Service -metadata: - {{- $serviceName := printf "%s-cassandra-pmem-service" .Release.Name }} - name: {{ $serviceName }} - labels: - {{- $appLabelSvc := printf "%s-%s" .Release.Name .Values.appLabelSuffix }} - app: {{ $appLabelSvc }} -spec: - nodePort: 30001 - type: NodePort - ports: - - name: cql - port: 9042 - targetPort: cql - - name: thrift - port: 30001 - targetPort: thrift - selector: - app: {{ $appLabelSvc }} -{{- end }} diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/statefulSet.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/statefulSet.yaml deleted file mode 100644 index 8bde7db..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/statefulSet.yaml +++ /dev/null @@ -1,129 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - {{- $statefulSetName := printf "%s-%s" .Release.Name .Values.statefulSetSuffix }} - name: {{ $statefulSetName }} -spec: - selector: - matchLabels: - {{- $appLabel := printf "%s-%s" .Release.Name .Values.appLabelSuffix }} - app: {{ $appLabel }} # has to match .spec.template.metadata.labels - {{- $serviceName := printf "%s-cassandra-pmem-svc" .Release.Name }} - serviceName: {{ $serviceName }} - replicas: {{ .Values.replicaCount }} # by default is 1 - template: - metadata: - labels: - app: {{ $appLabel }} # has to match .spec.selector.matchLabels - spec: - terminationGracePeriodSeconds: 10 - containers: - - name: cassandra-pmem - image: {{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }} - ports: - - containerPort: 9042 - name: cql - - containerPort: 7000 - name: inter-node - {{- if .Values.exposeJmxPort }} - - containerPort: 7199 - name: jmx-port - {{- end }} - {{- if .Values.resources.enabled }} - livenessProbe: - tcpSocket: - port: cql - initialDelaySeconds: 30 - periodSeconds: 30 - resources: - requests: - memory: {{ .Values.resources.requests.memory }} - cpu: {{ .Values.resources.requests.cpu }} - limits: - memory: {{ .Values.resources.limits.memory }} - cpu: {{ .Values.resources.limits.cpu }} - {{- end }} - {{- if ( not .Values.provideCustomConfig ) }} - env: - - name: CASSANDRA_SEED_ADDRESSES - {{- $seedAddresses := "" }} - {{- $nodeNumber := .Values.replicaCount | int }} - {{- $releaseName := .Release.Name }} - {{- range $index, $value := until $nodeNumber }} - {{- $seedAddresses = printf "%s%s-%d.%s:7000," $seedAddresses $statefulSetName $index $serviceName }} - {{- end}} - value: {{ $seedAddresses | quote }} - - name: CASSANDRA_CLUSTER_NAME - {{- $defaultClusterName := printf "%s-cassandra-pmem-k8s-cluster" .Release.Name }} - value: {{ .Values.clusterName | default $defaultClusterName | quote }} - - name: CASSANDRA_FSDAX_POOL_SIZE_GB - value: {{ .Values.pmem.fsdaxPoolSizeInGB | default "3" | quote }} - {{- if .Values.exposeJmxPort }} - - name: LOCAL_JMX - value: "no" - {{- end }} - {{- if .Values.jvmOpts.enabled }} - - name: JVM_OPTS - value: {{ .Values.jvmOpts.value }} - {{- end }} - {{- end }} - volumeMounts: - {{- if and (.Files.Glob "files/conf/*") (.Values.provideCustomConfig) }} - - name: config-volume - mountPath: /workspace/cassandra/conf - {{- end }} - {{- if and (.Files.Glob "files/additionalFiles/*") (.Values.enableAdditionalFilesConfigMap) }} - - name: additional-files-volume - mountPath: /etc/cassandra - {{- end }} - - name: cassandra-pmem-pvc - mountPath: /mnt/pmem - {{- if .Values.enablePersistence }} - - name: cassandra-data-pvc - mountPath: /workspace/cassandra/data - - name: cassandra-logs-pvc - mountPath: /workspace/cassandra/logs - {{- end }} - volumes: - {{- if and (.Files.Glob "files/conf/*") (.Values.provideCustomConfig) }} - - name: config-volume - configMap: - name: {{ .Release.Name }}-configmap - {{- end }} - {{- if and (.Files.Glob "files/additionalFiles/*") (.Values.enableAdditionalFilesConfigMap) }} - - name: additional-files-volume - configMap: - name: {{ .Release.Name }}-additional-files-configmap - {{- end }} - volumeClaimTemplates: - - metadata: - name: cassandra-pmem-pvc - spec: - accessModes: - - ReadWriteOnce - storageClassName: "pmem-csi-sc-ext4" - resources: - requests: - storage: {{ .Values.pmem.containerPmemAllocation | default "4G" | quote }} - {{- if .Values.enablePersistence }} - - metadata: - name: cassandra-data-pvc - spec: - accessModes: - - ReadWriteOnce - storageClassName: {{ .Values.persistentVolumes.dataStorageClass | quote }} - resources: - requests: - storage: {{ .Values.persistentVolumes.dataVolumeSize | default "2G" | quote }} - - metadata: - name: cassandra-logs-pvc - spec: - accessModes: - - ReadWriteOnce - storageClassName: {{ .Values.persistentVolumes.logsStorageClass | quote }} - resources: - requests: - storage: {{ .Values.persistentVolumes.logsVolumeSize | default "2G" | quote }} - {{- end }} - - diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/testProfilesConfigMap.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/testProfilesConfigMap.yaml deleted file mode 100644 index 5c45519..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/templates/testProfilesConfigMap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{- if and (.Files.Glob "files/testProfiles/*") (.Values.enableClientToolsPod) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Release.Name }}-test-profiles-configmap - labels: - app: {{printf "%s-%s" .Release.Name .Values.appLabelSuffix }} -data: - {{ (.Files.Glob "files/testProfiles/*").AsConfig | nindent 2 }} -{{- end }} diff --git a/stacks/dbrs/cassandra/cassandra-pmem-helm/values.yaml b/stacks/dbrs/cassandra/cassandra-pmem-helm/values.yaml deleted file mode 100644 index 636d415..0000000 --- a/stacks/dbrs/cassandra/cassandra-pmem-helm/values.yaml +++ /dev/null @@ -1,72 +0,0 @@ -clusterName: "cassandra-pmem-test-cluster" -#replica count specfies how many nodes will be used when deploying the cassandra-pmem cluster -replicaCount: 4 -statefulSetSuffix: cassandra-pmem-cluster -appLabelSuffix: cassandra-pmem - -#If set to true, the JMX port is also exposed as part of the service -#Please notice that exposing the port requires to setup authentication -#this can be accomplished providing the files using "enableAdditionalFilesConfigMap: true" -#The additional files inside /files/additionalFiles is mounted inside the pod -#on /etc/cassandra so additional files such as auth files for JMX can be added, by default some basic testing files are provided -#for production-like configuration some additional configuration needs to be done -exposeJmxPort: true -enableAdditionalFilesConfigMap: true - -#If set to true a NodePort service will be deployed to expose the cluster externally -exposeClusterExternally: false - -image: - repository: DOCKER_CASSANDRA_PMEM_REGISTRY - tag: latest - pullPolicy: IfNotPresent - name: CASSANDRA_IMAGE - -#Pool size should be ~ containerPmemAllocation - 2G, otherwise pmem cassandra wil fail allocating heap, -#this is because filesystem metadata use a portion of the total space requested in the persisten volume claim -pmem: - containerPmemAllocation: "4G" - fsdaxPoolSizeInGB: "3" - -#Non-Pmem resources to be used by each cassandra-pmem node -resources: - enabled: true - requests: - memory: "5G" - cpu: "1" - limits: - memory: "6G" - cpu: "4" - -#Variable used to control JVM_OPTS for the pods -jvmOpts: - enabled: true - value: "-Xms4G -Xmx4G -Xmn2G" - -#If enablePersistence is set to false, the data and logs dir will be using no K8s persistent volumes -#therefore the data on the cluster does not persist across container deletion and recreation, this option -#is useful for testing purposes -# -#custom storage classes can be used for data and logs, on a real world scenario it is prefered -#to use two different local storage devices in order to avoid bottlenecks and high network load -enablePersistence: true -persistentVolumes: - logsVolumeSize: 4G - dataVolumeSize: 4G - logsStorageClass: K8S_LOCAL_STORAGE_CLASS - dataStorageClass: K8S_LOCAL_STORAGE_CLASS - -#When set to true, the chart mounts the files stored in /files/conf as a read-only volume mounted in /workspace/cassandra/conf inside the pods. More complex -#configurations can be provided in this way -provideCustomConfig: false - -#Enable deploying a cassandra image containing client tools to test against the main cluster -#this image is run as an independent pod from the main deployment, also test profiles can be placed under -#the directory /files/testProfiles and those are mounted on /testProfiles inside the client tools pod -enableClientToolsPod: true -clientToolsImage: - repository: DOCKER_CLIENT_TOOLS_REGISTRY - tag: latest - pullPolicy: IfNotPresent - image: CLIENT_TOOLS_IMAGE - diff --git a/stacks/dbrs/cassandra/conf/cassandra-template.yaml b/stacks/dbrs/cassandra/conf/cassandra-template.yaml deleted file mode 100644 index bbba8e0..0000000 --- a/stacks/dbrs/cassandra/conf/cassandra-template.yaml +++ /dev/null @@ -1,1180 +0,0 @@ -# Cassandra storage config YAML - -# NOTE: -# See http://wiki.apache.org/cassandra/StorageConfiguration for -# full explanations of configuration directives -# /NOTE - -# The name of the cluster. This is mainly used to prevent machines in -# one logical cluster from joining another. -#cluster_name: 'Test Cluster' - -# This defines the number of tokens randomly assigned to this node on the ring -# The more tokens, relative to other nodes, the larger the proportion of data -# that this node will store. You probably want all nodes to have the same number -# of tokens assuming they have equal hardware capability. -# -# If you leave this unspecified, Cassandra will use the default of 1 token for legacy compatibility, -# and will use the initial_token as described below. -# -# Specifying initial_token will override this setting on the node's initial start, -# on subsequent starts, this setting will apply even if initial token is set. -# -# If you already have a cluster with 1 token per node, and wish to migrate to -# multiple tokens per node, see http://wiki.apache.org/cassandra/Operations -num_tokens: 256 - -# Triggers automatic allocation of num_tokens tokens for this node. The allocation -# algorithm attempts to choose tokens in a way that optimizes replicated load over -# the nodes in the datacenter for the replication strategy used by the specified -# keyspace. -# -# The load assigned to each node will be close to proportional to its number of -# vnodes. -# -# Only supported with the Murmur3Partitioner. -# allocate_tokens_for_keyspace: KEYSPACE - -# initial_token allows you to specify tokens manually. While you can use it with -# vnodes (num_tokens > 1, above) -- in which case you should provide a -# comma-separated list -- it's primarily used when adding nodes to legacy clusters -# that do not have vnodes enabled. -# initial_token: - -# See http://wiki.apache.org/cassandra/HintedHandoff -# May either be "true" or "false" to enable globally -hinted_handoff_enabled: true - -# When hinted_handoff_enabled is true, a black list of data centers that will not -# perform hinted handoff -# hinted_handoff_disabled_datacenters: -# - DC1 -# - DC2 - -# this defines the maximum amount of time a dead host will have hints -# generated. After it has been dead this long, new hints for it will not be -# created until it has been seen alive and gone down again. -max_hint_window_in_ms: 10800000 # 3 hours - -# Maximum throttle in KBs per second, per delivery thread. This will be -# reduced proportionally to the number of nodes in the cluster. (If there -# are two nodes in the cluster, each delivery thread will use the maximum -# rate; if there are three, each will throttle to half of the maximum, -# since we expect two nodes to be delivering hints simultaneously.) -hinted_handoff_throttle_in_kb: 1024 - -# Number of threads with which to deliver hints; -# Consider increasing this number when you have multi-dc deployments, since -# cross-dc handoff tends to be slower -max_hints_delivery_threads: 2 - -# Directory where Cassandra should store hints. -# If not set, the default directory is $CASSANDRA_HOME/data/hints. -# hints_directory: /var/lib/cassandra/hints - -# How often hints should be flushed from the internal buffers to disk. -# Will *not* trigger fsync. -hints_flush_period_in_ms: 10000 - -# Maximum size for a single hints file, in megabytes. -max_hints_file_size_in_mb: 128 - -# Compression to apply to the hint files. If omitted, hints files -# will be written uncompressed. LZ4, Snappy, and Deflate compressors -# are supported. -#hints_compression: -# - class_name: LZ4Compressor -# parameters: -# - - -# Maximum throttle in KBs per second, total. This will be -# reduced proportionally to the number of nodes in the cluster. -batchlog_replay_throttle_in_kb: 1024 - -# Authentication backend, implementing IAuthenticator; used to identify users -# Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthenticator, -# PasswordAuthenticator}. -# -# - AllowAllAuthenticator performs no checks - set it to disable authentication. -# - PasswordAuthenticator relies on username/password pairs to authenticate -# users. It keeps usernames and hashed passwords in system_auth.roles table. -# Please increase system_auth keyspace replication factor if you use this authenticator. -# If using PasswordAuthenticator, CassandraRoleManager must also be used (see below) -authenticator: AllowAllAuthenticator - -# Authorization backend, implementing IAuthorizer; used to limit access/provide permissions -# Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthorizer, -# CassandraAuthorizer}. -# -# - AllowAllAuthorizer allows any action to any user - set it to disable authorization. -# - CassandraAuthorizer stores permissions in system_auth.role_permissions table. Please -# increase system_auth keyspace replication factor if you use this authorizer. -authorizer: AllowAllAuthorizer - -# Part of the Authentication & Authorization backend, implementing IRoleManager; used -# to maintain grants and memberships between roles. -# Out of the box, Cassandra provides org.apache.cassandra.auth.CassandraRoleManager, -# which stores role information in the system_auth keyspace. Most functions of the -# IRoleManager require an authenticated login, so unless the configured IAuthenticator -# actually implements authentication, most of this functionality will be unavailable. -# -# - CassandraRoleManager stores role data in the system_auth keyspace. Please -# increase system_auth keyspace replication factor if you use this role manager. -role_manager: CassandraRoleManager - -# Network authorization backend, implementing INetworkAuthorizer; used to restrict user -# access to certain DCs -# Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllNetworkAuthorizer, -# CassandraNetworkAuthorizer}. -# -# - AllowAllNetworkAuthorizer allows access to any DC to any user - set it to disable authorization. -# - CassandraNetworkAuthorizer stores permissions in system_auth.network_permissions table. Please -# increase system_auth keyspace replication factor if you use this authorizer. -network_authorizer: AllowAllNetworkAuthorizer - -# Validity period for roles cache (fetching granted roles can be an expensive -# operation depending on the role manager, CassandraRoleManager is one example) -# Granted roles are cached for authenticated sessions in AuthenticatedUser and -# after the period specified here, become eligible for (async) reload. -# Defaults to 2000, set to 0 to disable caching entirely. -# Will be disabled automatically for AllowAllAuthenticator. -roles_validity_in_ms: 2000 - -# Refresh interval for roles cache (if enabled). -# After this interval, cache entries become eligible for refresh. Upon next -# access, an async reload is scheduled and the old value returned until it -# completes. If roles_validity_in_ms is non-zero, then this must be -# also. -# Defaults to the same value as roles_validity_in_ms. -# roles_update_interval_in_ms: 2000 - -# Validity period for permissions cache (fetching permissions can be an -# expensive operation depending on the authorizer, CassandraAuthorizer is -# one example). Defaults to 2000, set to 0 to disable. -# Will be disabled automatically for AllowAllAuthorizer. -permissions_validity_in_ms: 2000 - -# Refresh interval for permissions cache (if enabled). -# After this interval, cache entries become eligible for refresh. Upon next -# access, an async reload is scheduled and the old value returned until it -# completes. If permissions_validity_in_ms is non-zero, then this must be -# also. -# Defaults to the same value as permissions_validity_in_ms. -# permissions_update_interval_in_ms: 2000 - -# Validity period for credentials cache. This cache is tightly coupled to -# the provided PasswordAuthenticator implementation of IAuthenticator. If -# another IAuthenticator implementation is configured, this cache will not -# be automatically used and so the following settings will have no effect. -# Please note, credentials are cached in their encrypted form, so while -# activating this cache may reduce the number of queries made to the -# underlying table, it may not bring a significant reduction in the -# latency of individual authentication attempts. -# Defaults to 2000, set to 0 to disable credentials caching. -credentials_validity_in_ms: 2000 - -# Refresh interval for credentials cache (if enabled). -# After this interval, cache entries become eligible for refresh. Upon next -# access, an async reload is scheduled and the old value returned until it -# completes. If credentials_validity_in_ms is non-zero, then this must be -# also. -# Defaults to the same value as credentials_validity_in_ms. -# credentials_update_interval_in_ms: 2000 - -# The partitioner is responsible for distributing groups of rows (by -# partition key) across nodes in the cluster. You should leave this -# alone for new clusters. The partitioner can NOT be changed without -# reloading all data, so when upgrading you should set this to the -# same partitioner you were already using. -# -# Besides Murmur3Partitioner, partitioners included for backwards -# compatibility include RandomPartitioner, ByteOrderedPartitioner, and -# OrderPreservingPartitioner. -# -partitioner: org.apache.cassandra.dht.Murmur3Partitioner - -# Directories where Cassandra should store data on disk. If multiple -# directories are specified, Cassandra will spread data evenly across -# them by partitioning the token ranges. -# If not set, the default directory is $CASSANDRA_HOME/data/data. -# data_file_directories: -# - /var/lib/cassandra/data - -# commit log. when running on magnetic HDD, this should be a -# separate spindle than the data directories. -# If not set, the default directory is $CASSANDRA_HOME/data/commitlog. -# commitlog_directory: /var/lib/cassandra/commitlog - -# Enable / disable CDC functionality on a per-node basis. This modifies the logic used -# for write path allocation rejection (standard: never reject. cdc: reject Mutation -# containing a CDC-enabled table if at space limit in cdc_raw_directory). -cdc_enabled: false - -# CommitLogSegments are moved to this directory on flush if cdc_enabled: true and the -# segment contains mutations for a CDC-enabled table. This should be placed on a -# separate spindle than the data directories. If not set, the default directory is -# $CASSANDRA_HOME/data/cdc_raw. -# cdc_raw_directory: /var/lib/cassandra/cdc_raw - -# Policy for data disk failures: -# -# die -# shut down gossip and client transports and kill the JVM for any fs errors or -# single-sstable errors, so the node can be replaced. -# -# stop_paranoid -# shut down gossip and client transports even for single-sstable errors, -# kill the JVM for errors during startup. -# -# stop -# shut down gossip and client transports, leaving the node effectively dead, but -# can still be inspected via JMX, kill the JVM for errors during startup. -# -# best_effort -# stop using the failed disk and respond to requests based on -# remaining available sstables. This means you WILL see obsolete -# data at CL.ONE! -# -# ignore -# ignore fatal errors and let requests fail, as in pre-1.2 Cassandra -disk_failure_policy: stop - -# Policy for commit disk failures: -# -# die -# shut down the node and kill the JVM, so the node can be replaced. -# -# stop -# shut down the node, leaving the node effectively dead, but -# can still be inspected via JMX. -# -# stop_commit -# shutdown the commit log, letting writes collect but -# continuing to service reads, as in pre-2.0.5 Cassandra -# -# ignore -# ignore fatal errors and let the batches fail -commit_failure_policy: stop - -# Maximum size of the native protocol prepared statement cache -# -# Valid values are either "auto" (omitting the value) or a value greater 0. -# -# Note that specifying a too large value will result in long running GCs and possbily -# out-of-memory errors. Keep the value at a small fraction of the heap. -# -# If you constantly see "prepared statements discarded in the last minute because -# cache limit reached" messages, the first step is to investigate the root cause -# of these messages and check whether prepared statements are used correctly - -# i.e. use bind markers for variable parts. -# -# Do only change the default value, if you really have more prepared statements than -# fit in the cache. In most cases it is not neccessary to change this value. -# Constantly re-preparing statements is a performance penalty. -# -# Default value ("auto") is 1/256th of the heap or 10MB, whichever is greater -prepared_statements_cache_size_mb: - -# Maximum size of the key cache in memory. -# -# Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the -# minimum, sometimes more. The key cache is fairly tiny for the amount of -# time it saves, so it's worthwhile to use it at large numbers. -# The row cache saves even more time, but must contain the entire row, -# so it is extremely space-intensive. It's best to only use the -# row cache if you have hot rows or static rows. -# -# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup. -# -# Default value is empty to make it "auto" (min(5% of Heap (in MB), 100MB)). Set to 0 to disable key cache. -key_cache_size_in_mb: - -# Duration in seconds after which Cassandra should -# save the key cache. Caches are saved to saved_caches_directory as -# specified in this configuration file. -# -# Saved caches greatly improve cold-start speeds, and is relatively cheap in -# terms of I/O for the key cache. Row cache saving is much more expensive and -# has limited use. -# -# Default is 14400 or 4 hours. -key_cache_save_period: 14400 - -# Number of keys from the key cache to save -# Disabled by default, meaning all keys are going to be saved -# key_cache_keys_to_save: 100 - -# Row cache implementation class name. Available implementations: -# -# org.apache.cassandra.cache.OHCProvider -# Fully off-heap row cache implementation (default). -# -# org.apache.cassandra.cache.SerializingCacheProvider -# This is the row cache implementation availabile -# in previous releases of Cassandra. -# row_cache_class_name: org.apache.cassandra.cache.OHCProvider - -# Maximum size of the row cache in memory. -# Please note that OHC cache implementation requires some additional off-heap memory to manage -# the map structures and some in-flight memory during operations before/after cache entries can be -# accounted against the cache capacity. This overhead is usually small compared to the whole capacity. -# Do not specify more memory that the system can afford in the worst usual situation and leave some -# headroom for OS block level cache. Do never allow your system to swap. -# -# Default value is 0, to disable row caching. -row_cache_size_in_mb: 0 - -# Duration in seconds after which Cassandra should save the row cache. -# Caches are saved to saved_caches_directory as specified in this configuration file. -# -# Saved caches greatly improve cold-start speeds, and is relatively cheap in -# terms of I/O for the key cache. Row cache saving is much more expensive and -# has limited use. -# -# Default is 0 to disable saving the row cache. -row_cache_save_period: 0 - -# Number of keys from the row cache to save. -# Specify 0 (which is the default), meaning all keys are going to be saved -# row_cache_keys_to_save: 100 - -# Maximum size of the counter cache in memory. -# -# Counter cache helps to reduce counter locks' contention for hot counter cells. -# In case of RF = 1 a counter cache hit will cause Cassandra to skip the read before -# write entirely. With RF > 1 a counter cache hit will still help to reduce the duration -# of the lock hold, helping with hot counter cell updates, but will not allow skipping -# the read entirely. Only the local (clock, count) tuple of a counter cell is kept -# in memory, not the whole counter, so it's relatively cheap. -# -# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup. -# -# Default value is empty to make it "auto" (min(2.5% of Heap (in MB), 50MB)). Set to 0 to disable counter cache. -# NOTE: if you perform counter deletes and rely on low gcgs, you should disable the counter cache. -counter_cache_size_in_mb: - -# Duration in seconds after which Cassandra should -# save the counter cache (keys only). Caches are saved to saved_caches_directory as -# specified in this configuration file. -# -# Default is 7200 or 2 hours. -counter_cache_save_period: 7200 - -# Number of keys from the counter cache to save -# Disabled by default, meaning all keys are going to be saved -# counter_cache_keys_to_save: 100 - -# saved caches -# If not set, the default directory is $CASSANDRA_HOME/data/saved_caches. -# saved_caches_directory: /var/lib/cassandra/saved_caches - -# commitlog_sync may be either "periodic", "group", or "batch." -# -# When in batch mode, Cassandra won't ack writes until the commit log -# has been flushed to disk. Each incoming write will trigger the flush task. -# commitlog_sync_batch_window_in_ms is a deprecated value. Previously it had -# almost no value, and is being removed. -# -# commitlog_sync_batch_window_in_ms: 2 -# -# group mode is similar to batch mode, where Cassandra will not ack writes -# until the commit log has been flushed to disk. The difference is group -# mode will wait up to commitlog_sync_group_window_in_ms between flushes. -# -# commitlog_sync_group_window_in_ms: 1000 -# -# the default option is "periodic" where writes may be acked immediately -# and the CommitLog is simply synced every commitlog_sync_period_in_ms -# milliseconds. -commitlog_sync: periodic -commitlog_sync_period_in_ms: 10000 - -# The size of the individual commitlog file segments. A commitlog -# segment may be archived, deleted, or recycled once all the data -# in it (potentially from each columnfamily in the system) has been -# flushed to sstables. -# -# The default size is 32, which is almost always fine, but if you are -# archiving commitlog segments (see commitlog_archiving.properties), -# then you probably want a finer granularity of archiving; 8 or 16 MB -# is reasonable. -# Max mutation size is also configurable via max_mutation_size_in_kb setting in -# cassandra.yaml. The default is half the size commitlog_segment_size_in_mb * 1024. -# This should be positive and less than 2048. -# -# NOTE: If max_mutation_size_in_kb is set explicitly then commitlog_segment_size_in_mb must -# be set to at least twice the size of max_mutation_size_in_kb / 1024 -# -commitlog_segment_size_in_mb: 32 - -# Compression to apply to the commit log. If omitted, the commit log -# will be written uncompressed. LZ4, Snappy, and Deflate compressors -# are supported. -# commitlog_compression: -# - class_name: LZ4Compressor -# parameters: -# - - -# any class that implements the SeedProvider interface and has a -# constructor that takes a Map of parameters will do. -#seed_provider: - # Addresses of hosts that are deemed contact points. - # Cassandra nodes use this list of hosts to find each other and learn - # the topology of the ring. You must change this if you are running - # multiple nodes! - # - class_name: org.apache.cassandra.locator.SimpleSeedProvider - #parameters: - # seeds is actually a comma-delimited list of addresses. - # Ex: ",," - #- seeds: "127.0.0.1:7000" - -# For workloads with more data than can fit in memory, Cassandra's -# bottleneck will be reads that need to fetch data from -# disk. "concurrent_reads" should be set to (16 * number_of_drives) in -# order to allow the operations to enqueue low enough in the stack -# that the OS and drives can reorder them. Same applies to -# "concurrent_counter_writes", since counter writes read the current -# values before incrementing and writing them back. -# -# On the other hand, since writes are almost never IO bound, the ideal -# number of "concurrent_writes" is dependent on the number of cores in -# your system; (8 * number_of_cores) is a good rule of thumb. -concurrent_reads: 32 -concurrent_writes: 32 -concurrent_counter_writes: 32 - -# For materialized view writes, as there is a read involved, so this should -# be limited by the less of concurrent reads or concurrent writes. -concurrent_materialized_view_writes: 32 - -# Maximum memory to use for sstable chunk cache and buffer pooling. -# 32MB of this are reserved for pooling buffers, the rest is used as an -# cache that holds uncompressed sstable chunks. -# Defaults to the smaller of 1/4 of heap or 512MB. This pool is allocated off-heap, -# so is in addition to the memory allocated for heap. The cache also has on-heap -# overhead which is roughly 128 bytes per chunk (i.e. 0.2% of the reserved size -# if the default 64k chunk size is used). -# Memory is only allocated when needed. -# file_cache_size_in_mb: 512 - -# Flag indicating whether to allocate on or off heap when the sstable buffer -# pool is exhausted, that is when it has exceeded the maximum memory -# file_cache_size_in_mb, beyond which it will not cache buffers but allocate on request. - -# buffer_pool_use_heap_if_exhausted: true - -# The strategy for optimizing disk read -# Possible values are: -# ssd (for solid state disks, the default) -# spinning (for spinning disks) -# disk_optimization_strategy: ssd - -# Total permitted memory to use for memtables. Cassandra will stop -# accepting writes when the limit is exceeded until a flush completes, -# and will trigger a flush based on memtable_cleanup_threshold -# If omitted, Cassandra will set both to 1/4 the size of the heap. -# memtable_heap_space_in_mb: 2048 -# memtable_offheap_space_in_mb: 2048 - -# memtable_cleanup_threshold is deprecated. The default calculation -# is the only reasonable choice. See the comments on memtable_flush_writers -# for more information. -# -# Ratio of occupied non-flushing memtable size to total permitted size -# that will trigger a flush of the largest memtable. Larger mct will -# mean larger flushes and hence less compaction, but also less concurrent -# flush activity which can make it difficult to keep your disks fed -# under heavy write load. -# -# memtable_cleanup_threshold defaults to 1 / (memtable_flush_writers + 1) -# memtable_cleanup_threshold: 0.11 - -# Specify the way Cassandra allocates and manages memtable memory. -# Options are: -# -# heap_buffers -# on heap nio buffers -# -# offheap_buffers -# off heap (direct) nio buffers -# -# offheap_objects -# off heap objects -memtable_allocation_type: heap_buffers - -# Total space to use for commit logs on disk. -# -# If space gets above this value, Cassandra will flush every dirty CF -# in the oldest segment and remove it. So a small total commitlog space -# will tend to cause more flush activity on less-active columnfamilies. -# -# The default value is the smaller of 8192, and 1/4 of the total space -# of the commitlog volume. -# -# commitlog_total_space_in_mb: 8192 - -# This sets the number of memtable flush writer threads per disk -# as well as the total number of memtables that can be flushed concurrently. -# These are generally a combination of compute and IO bound. -# -# Memtable flushing is more CPU efficient than memtable ingest and a single thread -# can keep up with the ingest rate of a whole server on a single fast disk -# until it temporarily becomes IO bound under contention typically with compaction. -# At that point you need multiple flush threads. At some point in the future -# it may become CPU bound all the time. -# -# You can tell if flushing is falling behind using the MemtablePool.BlockedOnAllocation -# metric which should be 0, but will be non-zero if threads are blocked waiting on flushing -# to free memory. -# -# memtable_flush_writers defaults to two for a single data directory. -# This means that two memtables can be flushed concurrently to the single data directory. -# If you have multiple data directories the default is one memtable flushing at a time -# but the flush will use a thread per data directory so you will get two or more writers. -# -# Two is generally enough to flush on a fast disk [array] mounted as a single data directory. -# Adding more flush writers will result in smaller more frequent flushes that introduce more -# compaction overhead. -# -# There is a direct tradeoff between number of memtables that can be flushed concurrently -# and flush size and frequency. More is not better you just need enough flush writers -# to never stall waiting for flushing to free memory. -# -#memtable_flush_writers: 2 - -# Total space to use for change-data-capture logs on disk. -# -# If space gets above this value, Cassandra will throw WriteTimeoutException -# on Mutations including tables with CDC enabled. A CDCCompactor is responsible -# for parsing the raw CDC logs and deleting them when parsing is completed. -# -# The default value is the min of 4096 mb and 1/8th of the total space -# of the drive where cdc_raw_directory resides. -# cdc_total_space_in_mb: 4096 - -# When we hit our cdc_raw limit and the CDCCompactor is either running behind -# or experiencing backpressure, we check at the following interval to see if any -# new space for cdc-tracked tables has been made available. Default to 250ms -# cdc_free_space_check_interval_ms: 250 - -# A fixed memory pool size in MB for for SSTable index summaries. If left -# empty, this will default to 5% of the heap size. If the memory usage of -# all index summaries exceeds this limit, SSTables with low read rates will -# shrink their index summaries in order to meet this limit. However, this -# is a best-effort process. In extreme conditions Cassandra may need to use -# more than this amount of memory. -index_summary_capacity_in_mb: - -# How frequently index summaries should be resampled. This is done -# periodically to redistribute memory from the fixed-size pool to sstables -# proportional their recent read rates. Setting to -1 will disable this -# process, leaving existing index summaries at their current sampling level. -index_summary_resize_interval_in_minutes: 60 - -# Whether to, when doing sequential writing, fsync() at intervals in -# order to force the operating system to flush the dirty -# buffers. Enable this to avoid sudden dirty buffer flushing from -# impacting read latencies. Almost always a good idea on SSDs; not -# necessarily on platters. -trickle_fsync: false -trickle_fsync_interval_in_kb: 10240 - -# TCP port, for commands and data -# For security reasons, you should not expose this port to the internet. Firewall it if needed. -storage_port: 7000 - -# SSL port, for legacy encrypted communication. This property is unused unless enabled in -# server_encryption_options (see below). As of cassandra 4.0, this property is deprecated -# as a single port can be used for either/both secure and insecure connections. -# For security reasons, you should not expose this port to the internet. Firewall it if needed. -ssl_storage_port: 7001 - -# Address or interface to bind to and tell other Cassandra nodes to connect to. -# You _must_ change this if you want multiple nodes to be able to communicate! -# -# Set listen_address OR listen_interface, not both. -# -# Leaving it blank leaves it up to InetAddress.getLocalHost(). This -# will always do the Right Thing _if_ the node is properly configured -# (hostname, name resolution, etc), and the Right Thing is to use the -# address associated with the hostname (it might not be). -# -# Setting listen_address to 0.0.0.0 is always wrong. -# -#listen_address: localhost - -# Set listen_address OR listen_interface, not both. Interfaces must correspond -# to a single address, IP aliasing is not supported. -# listen_interface: eth0 - -# If you choose to specify the interface by name and the interface has an ipv4 and an ipv6 address -# you can specify which should be chosen using listen_interface_prefer_ipv6. If false the first ipv4 -# address will be used. If true the first ipv6 address will be used. Defaults to false preferring -# ipv4. If there is only one address it will be selected regardless of ipv4/ipv6. -# listen_interface_prefer_ipv6: false - -# Address to broadcast to other Cassandra nodes -# Leaving this blank will set it to the same value as listen_address -# broadcast_address: 1.2.3.4 - -# When using multiple physical network interfaces, set this -# to true to listen on broadcast_address in addition to -# the listen_address, allowing nodes to communicate in both -# interfaces. -# Ignore this property if the network configuration automatically -# routes between the public and private networks such as EC2. -# listen_on_broadcast_address: false - -# Internode authentication backend, implementing IInternodeAuthenticator; -# used to allow/disallow connections from peer nodes. -# internode_authenticator: org.apache.cassandra.auth.AllowAllInternodeAuthenticator - -# Whether to start the native transport server. -# The address on which the native transport is bound is defined by rpc_address. -start_native_transport: true -# port for the CQL native transport to listen for clients on -# For security reasons, you should not expose this port to the internet. Firewall it if needed. -native_transport_port: 9042 -# Enabling native transport encryption in client_encryption_options allows you to either use -# encryption for the standard port or to use a dedicated, additional port along with the unencrypted -# standard native_transport_port. -# Enabling client encryption and keeping native_transport_port_ssl disabled will use encryption -# for native_transport_port. Setting native_transport_port_ssl to a different value -# from native_transport_port will use encryption for native_transport_port_ssl while -# keeping native_transport_port unencrypted. -# native_transport_port_ssl: 9142 -# The maximum threads for handling requests (note that idle threads are stopped -# after 30 seconds so there is not corresponding minimum setting). -# native_transport_max_threads: 128 -# -# The maximum size of allowed frame. Frame (requests) larger than this will -# be rejected as invalid. The default is 256MB. If you're changing this parameter, -# you may want to adjust max_value_size_in_mb accordingly. This should be positive and less than 2048. -# native_transport_max_frame_size_in_mb: 256 - -# The maximum number of concurrent client connections. -# The default is -1, which means unlimited. -# native_transport_max_concurrent_connections: -1 - -# The maximum number of concurrent client connections per source ip. -# The default is -1, which means unlimited. -# native_transport_max_concurrent_connections_per_ip: -1 - -# The address or interface to bind the native transport server to. -# -# Set rpc_address OR rpc_interface, not both. -# -# Leaving rpc_address blank has the same effect as on listen_address -# (i.e. it will be based on the configured hostname of the node). -# -# Note that unlike listen_address, you can specify 0.0.0.0, but you must also -# set broadcast_rpc_address to a value other than 0.0.0.0. -# -# For security reasons, you should not expose this port to the internet. Firewall it if needed. -#rpc_address: localhost - -# Set rpc_address OR rpc_interface, not both. Interfaces must correspond -# to a single address, IP aliasing is not supported. -# rpc_interface: eth1 - -# If you choose to specify the interface by name and the interface has an ipv4 and an ipv6 address -# you can specify which should be chosen using rpc_interface_prefer_ipv6. If false the first ipv4 -# address will be used. If true the first ipv6 address will be used. Defaults to false preferring -# ipv4. If there is only one address it will be selected regardless of ipv4/ipv6. -# rpc_interface_prefer_ipv6: false - -# RPC address to broadcast to drivers and other Cassandra nodes. This cannot -# be set to 0.0.0.0. If left blank, this will be set to the value of -# rpc_address. If rpc_address is set to 0.0.0.0, broadcast_rpc_address must -# be set. -# broadcast_rpc_address: 1.2.3.4 - -# enable or disable keepalive on rpc/native connections -rpc_keepalive: true - -# Uncomment to set socket buffer size for internode communication -# Note that when setting this, the buffer size is limited by net.core.wmem_max -# and when not setting it it is defined by net.ipv4.tcp_wmem -# See also: -# /proc/sys/net/core/wmem_max -# /proc/sys/net/core/rmem_max -# /proc/sys/net/ipv4/tcp_wmem -# /proc/sys/net/ipv4/tcp_wmem -# and 'man tcp' -# internode_send_buff_size_in_bytes: - -# Uncomment to set socket buffer size for internode communication -# Note that when setting this, the buffer size is limited by net.core.wmem_max -# and when not setting it it is defined by net.ipv4.tcp_wmem -# internode_recv_buff_size_in_bytes: - -# Set to true to have Cassandra create a hard link to each sstable -# flushed or streamed locally in a backups/ subdirectory of the -# keyspace data. Removing these links is the operator's -# responsibility. -incremental_backups: false - -# Whether or not to take a snapshot before each compaction. Be -# careful using this option, since Cassandra won't clean up the -# snapshots for you. Mostly useful if you're paranoid when there -# is a data format change. -snapshot_before_compaction: false - -# Whether or not a snapshot is taken of the data before keyspace truncation -# or dropping of column families. The STRONGLY advised default of true -# should be used to provide data safety. If you set this flag to false, you will -# lose data on truncation or drop. -auto_snapshot: true - -# Granularity of the collation index of rows within a partition. -# Increase if your rows are large, or if you have a very large -# number of rows per partition. The competing goals are these: -# -# - a smaller granularity means more index entries are generated -# and looking up rows withing the partition by collation column -# is faster -# - but, Cassandra will keep the collation index in memory for hot -# rows (as part of the key cache), so a larger granularity means -# you can cache more hot rows -column_index_size_in_kb: 64 - -# Per sstable indexed key cache entries (the collation index in memory -# mentioned above) exceeding this size will not be held on heap. -# This means that only partition information is held on heap and the -# index entries are read from disk. -# -# Note that this size refers to the size of the -# serialized index information and not the size of the partition. -column_index_cache_size_in_kb: 2 - -# Number of simultaneous compactions to allow, NOT including -# validation "compactions" for anti-entropy repair. Simultaneous -# compactions can help preserve read performance in a mixed read/write -# workload, by mitigating the tendency of small sstables to accumulate -# during a single long running compactions. The default is usually -# fine and if you experience problems with compaction running too -# slowly or too fast, you should look at -# compaction_throughput_mb_per_sec first. -# -# concurrent_compactors defaults to the smaller of (number of disks, -# number of cores), with a minimum of 2 and a maximum of 8. -# -# If your data directories are backed by SSD, you should increase this -# to the number of cores. -#concurrent_compactors: 1 - -# Number of simultaneous repair validations to allow. Default is unbounded -# Values less than one are interpreted as unbounded (the default) -# concurrent_validations: 0 - -# Number of simultaneous materialized view builder tasks to allow. -concurrent_materialized_view_builders: 1 - -# Throttles compaction to the given total throughput across the entire -# system. The faster you insert data, the faster you need to compact in -# order to keep the sstable count down, but in general, setting this to -# 16 to 32 times the rate you are inserting data is more than sufficient. -# Setting this to 0 disables throttling. Note that this account for all types -# of compaction, including validation compaction. -compaction_throughput_mb_per_sec: 16 - -# When compacting, the replacement sstable(s) can be opened before they -# are completely written, and used in place of the prior sstables for -# any range that has been written. This helps to smoothly transfer reads -# between the sstables, reducing page cache churn and keeping hot rows hot -sstable_preemptive_open_interval_in_mb: 50 - -# Throttles all outbound streaming file transfers on this node to the -# given total throughput in Mbps. This is necessary because Cassandra does -# mostly sequential IO when streaming data during bootstrap or repair, which -# can lead to saturating the network connection and degrading rpc performance. -# When unset, the default is 200 Mbps or 25 MB/s. -# stream_throughput_outbound_megabits_per_sec: 200 - -# Throttles all streaming file transfer between the datacenters, -# this setting allows users to throttle inter dc stream throughput in addition -# to throttling all network stream traffic as configured with -# stream_throughput_outbound_megabits_per_sec -# When unset, the default is 200 Mbps or 25 MB/s -# inter_dc_stream_throughput_outbound_megabits_per_sec: 200 - -# How long the coordinator should wait for read operations to complete. -# Lowest acceptable value is 10 ms. -read_request_timeout_in_ms: 5000 -# How long the coordinator should wait for seq or index scans to complete. -# Lowest acceptable value is 10 ms. -range_request_timeout_in_ms: 10000 -# How long the coordinator should wait for writes to complete. -# Lowest acceptable value is 10 ms. -write_request_timeout_in_ms: 2000 -# How long the coordinator should wait for counter writes to complete. -# Lowest acceptable value is 10 ms. -counter_write_request_timeout_in_ms: 5000 -# How long a coordinator should continue to retry a CAS operation -# that contends with other proposals for the same row. -# Lowest acceptable value is 10 ms. -cas_contention_timeout_in_ms: 1000 -# How long the coordinator should wait for truncates to complete -# (This can be much longer, because unless auto_snapshot is disabled -# we need to flush first so we can snapshot before removing the data.) -# Lowest acceptable value is 10 ms. -truncate_request_timeout_in_ms: 60000 -# The default timeout for other, miscellaneous operations. -# Lowest acceptable value is 10 ms. -request_timeout_in_ms: 10000 - -# How long before a node logs slow queries. Select queries that take longer than -# this timeout to execute, will generate an aggregated log message, so that slow queries -# can be identified. Set this value to zero to disable slow query logging. -slow_query_log_timeout_in_ms: 500 - -# Enable operation timeout information exchange between nodes to accurately -# measure request timeouts. If disabled, replicas will assume that requests -# were forwarded to them instantly by the coordinator, which means that -# under overload conditions we will waste that much extra time processing -# already-timed-out requests. -# -# Warning: before enabling this property make sure to ntp is installed -# and the times are synchronized between the nodes. -cross_node_timeout: false - -# Set keep-alive period for streaming -# This node will send a keep-alive message periodically with this period. -# If the node does not receive a keep-alive message from the peer for -# 2 keep-alive cycles the stream session times out and fail -# Default value is 300s (5 minutes), which means stalled stream -# times out in 10 minutes by default -# streaming_keep_alive_period_in_secs: 300 - -# Limit number of connections per host for streaming -# Increase this when you notice that joins are CPU-bound rather that network -# bound (for example a few nodes with big files). -# streaming_connections_per_host: 1 - - -# phi value that must be reached for a host to be marked down. -# most users should never need to adjust this. -# phi_convict_threshold: 8 - -# endpoint_snitch -- Set this to a class that implements -# IEndpointSnitch. The snitch has two functions: -# -# - it teaches Cassandra enough about your network topology to route -# requests efficiently -# - it allows Cassandra to spread replicas around your cluster to avoid -# correlated failures. It does this by grouping machines into -# "datacenters" and "racks." Cassandra will do its best not to have -# more than one replica on the same "rack" (which may not actually -# be a physical location) -# -# CASSANDRA WILL NOT ALLOW YOU TO SWITCH TO AN INCOMPATIBLE SNITCH -# ONCE DATA IS INSERTED INTO THE CLUSTER. This would cause data loss. -# This means that if you start with the default SimpleSnitch, which -# locates every node on "rack1" in "datacenter1", your only options -# if you need to add another datacenter are GossipingPropertyFileSnitch -# (and the older PFS). From there, if you want to migrate to an -# incompatible snitch like Ec2Snitch you can do it by adding new nodes -# under Ec2Snitch (which will locate them in a new "datacenter") and -# decommissioning the old ones. -# -# Out of the box, Cassandra provides: -# -# SimpleSnitch: -# Treats Strategy order as proximity. This can improve cache -# locality when disabling read repair. Only appropriate for -# single-datacenter deployments. -# -# GossipingPropertyFileSnitch -# This should be your go-to snitch for production use. The rack -# and datacenter for the local node are defined in -# cassandra-rackdc.properties and propagated to other nodes via -# gossip. If cassandra-topology.properties exists, it is used as a -# fallback, allowing migration from the PropertyFileSnitch. -# -# PropertyFileSnitch: -# Proximity is determined by rack and data center, which are -# explicitly configured in cassandra-topology.properties. -# -# Ec2Snitch: -# Appropriate for EC2 deployments in a single Region. Loads Region -# and Availability Zone information from the EC2 API. The Region is -# treated as the datacenter, and the Availability Zone as the rack. -# Only private IPs are used, so this will not work across multiple -# Regions. -# -# Ec2MultiRegionSnitch: -# Uses public IPs as broadcast_address to allow cross-region -# connectivity. (Thus, you should set seed addresses to the public -# IP as well.) You will need to open the storage_port or -# ssl_storage_port on the public IP firewall. (For intra-Region -# traffic, Cassandra will switch to the private IP after -# establishing a connection.) -# -# RackInferringSnitch: -# Proximity is determined by rack and data center, which are -# assumed to correspond to the 3rd and 2nd octet of each node's IP -# address, respectively. Unless this happens to match your -# deployment conventions, this is best used as an example of -# writing a custom Snitch class and is provided in that spirit. -# -# You can use a custom Snitch by setting this to the full class name -# of the snitch, which will be assumed to be on your classpath. -#endpoint_snitch: SimpleSnitch - -# controls how often to perform the more expensive part of host score -# calculation -dynamic_snitch_update_interval_in_ms: 100 -# controls how often to reset all host scores, allowing a bad host to -# possibly recover -dynamic_snitch_reset_interval_in_ms: 600000 -# if set greater than zero, this will allow -# 'pinning' of replicas to hosts in order to increase cache capacity. -# The badness threshold will control how much worse the pinned host has to be -# before the dynamic snitch will prefer other replicas over it. This is -# expressed as a double which represents a percentage. Thus, a value of -# 0.2 means Cassandra would continue to prefer the static snitch values -# until the pinned host was 20% worse than the fastest. -dynamic_snitch_badness_threshold: 0.1 - -# Enable or disable inter-node encryption -# JVM and netty defaults for supported SSL socket protocols and cipher suites can -# be replaced using custom encryption options. This is not recommended -# unless you have policies in place that dictate certain settings, or -# need to disable vulnerable ciphers or protocols in case the JVM cannot -# be updated. -# FIPS compliant settings can be configured at JVM level and should not -# involve changing encryption settings here: -# https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/FIPS.html -# -# *NOTE* No custom encryption options are enabled at the moment -# The available internode options are : all, none, dc, rack -# If set to dc cassandra will encrypt the traffic between the DCs -# If set to rack cassandra will encrypt the traffic between the racks -# -# The passwords used in these options must match the passwords used when generating -# the keystore and truststore. For instructions on generating these files, see: -# http://download.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore -# -server_encryption_options: - # set to true for allowing secure incoming connections - enabled: false - # If enabled and optional are both set to true, encrypted and unencrypted connections are handled on the storage_port - optional: false - # if enabled, will open up an encrypted listening socket on ssl_storage_port. Should be used - # during upgrade to 4.0; otherwise, set to false. - enable_legacy_ssl_storage_port: false - # on outbound connections, determine which type of peers to securely connect to. 'enabled' must be set to true. - internode_encryption: none - keystore: conf/.keystore - keystore_password: cassandra - truststore: conf/.truststore - truststore_password: cassandra - # More advanced defaults below: - # protocol: TLS - # store_type: JKS - # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA] - # require_client_auth: false - # require_endpoint_verification: false - -# enable or disable client-to-server encryption. -client_encryption_options: - enabled: false - # If enabled and optional is set to true encrypted and unencrypted connections are handled. - optional: false - keystore: conf/.keystore - keystore_password: cassandra - # require_client_auth: false - # Set trustore and truststore_password if require_client_auth is true - # truststore: conf/.truststore - # truststore_password: cassandra - # More advanced defaults below: - # protocol: TLS - # store_type: JKS - # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA] - -# internode_compression controls whether traffic between nodes is -# compressed. -# Can be: -# -# all -# all traffic is compressed -# -# dc -# traffic between different datacenters is compressed -# -# none -# nothing is compressed. -internode_compression: dc - -# Enable or disable tcp_nodelay for inter-dc communication. -# Disabling it will result in larger (but fewer) network packets being sent, -# reducing overhead from the TCP protocol itself, at the cost of increasing -# latency if you block for cross-datacenter responses. -inter_dc_tcp_nodelay: false - -# TTL for different trace types used during logging of the repair process. -tracetype_query_ttl: 86400 -tracetype_repair_ttl: 604800 - -# If unset, all GC Pauses greater than gc_log_threshold_in_ms will log at -# INFO level -# UDFs (user defined functions) are disabled by default. -# As of Cassandra 3.0 there is a sandbox in place that should prevent execution of evil code. -enable_user_defined_functions: false - -# Enables scripted UDFs (JavaScript UDFs). -# Java UDFs are always enabled, if enable_user_defined_functions is true. -# Enable this option to be able to use UDFs with "language javascript" or any custom JSR-223 provider. -# This option has no effect, if enable_user_defined_functions is false. -enable_scripted_user_defined_functions: false - -# Enables materialized view creation on this node. -# Materialized views are considered experimental and are not recommended for production use. -enable_materialized_views: true - -# The default Windows kernel timer and scheduling resolution is 15.6ms for power conservation. -# Lowering this value on Windows can provide much tighter latency and better throughput, however -# some virtualized environments may see a negative performance impact from changing this setting -# below their system default. The sysinternals 'clockres' tool can confirm your system's default -# setting. -windows_timer_interval: 1 - - -# Enables encrypting data at-rest (on disk). Different key providers can be plugged in, but the default reads from -# a JCE-style keystore. A single keystore can hold multiple keys, but the one referenced by -# the "key_alias" is the only key that will be used for encrypt opertaions; previously used keys -# can still (and should!) be in the keystore and will be used on decrypt operations -# (to handle the case of key rotation). -# -# It is strongly recommended to download and install Java Cryptography Extension (JCE) -# Unlimited Strength Jurisdiction Policy Files for your version of the JDK. -# (current link: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html) -# -# Currently, only the following file types are supported for transparent data encryption, although -# more are coming in future cassandra releases: commitlog, hints -transparent_data_encryption_options: - enabled: false - chunk_length_kb: 64 - cipher: AES/CBC/PKCS5Padding - key_alias: testing:1 - # CBC IV length for AES needs to be 16 bytes (which is also the default size) - # iv_length: 16 - key_provider: - - class_name: org.apache.cassandra.security.JKSKeyProvider - parameters: - - keystore: conf/.keystore - keystore_password: cassandra - store_type: JCEKS - key_password: cassandra - - -##################### -# SAFETY THRESHOLDS # -##################### - -# When executing a scan, within or across a partition, we need to keep the -# tombstones seen in memory so we can return them to the coordinator, which -# will use them to make sure other replicas also know about the deleted rows. -# With workloads that generate a lot of tombstones, this can cause performance -# problems and even exaust the server heap. -# (http://www.datastax.com/dev/blog/cassandra-anti-patterns-queues-and-queue-like-datasets) -# Adjust the thresholds here if you understand the dangers and want to -# scan more tombstones anyway. These thresholds may also be adjusted at runtime -# using the StorageService mbean. -tombstone_warn_threshold: 1000 -tombstone_failure_threshold: 100000 - -# Log WARN on any multiple-partition batch size exceeding this value. 5kb per batch by default. -# Caution should be taken on increasing the size of this threshold as it can lead to node instability. -batch_size_warn_threshold_in_kb: 5 - -# Fail any multiple-partition batch exceeding this value. 50kb (10x warn threshold) by default. -batch_size_fail_threshold_in_kb: 50 - -# Log WARN on any batches not of type LOGGED than span across more partitions than this limit -unlogged_batch_across_partitions_warn_threshold: 10 - -# Log a warning when compacting partitions larger than this value -compaction_large_partition_warning_threshold_mb: 100 - -# GC Pauses greater than 200 ms will be logged at INFO level -# This threshold can be adjusted to minimize logging if necessary -# gc_log_threshold_in_ms: 200 - -# GC Pauses greater than gc_warn_threshold_in_ms will be logged at WARN level -# Adjust the threshold based on your application throughput requirement. Setting to 0 -# will deactivate the feature. -# gc_warn_threshold_in_ms: 1000 - -# Maximum size of any value in SSTables. Safety measure to detect SSTable corruption -# early. Any value size larger than this threshold will result into marking an SSTable -# as corrupted. This should be positive and less than 2048. -# max_value_size_in_mb: 256 - -# Back-pressure settings # -# If enabled, the coordinator will apply the back-pressure strategy specified below to each mutation -# sent to replicas, with the aim of reducing pressure on overloaded replicas. -back_pressure_enabled: false -# The back-pressure strategy applied. -# The default implementation, RateBasedBackPressure, takes three arguments: -# high ratio, factor, and flow type, and uses the ratio between incoming mutation responses and outgoing mutation requests. -# If below high ratio, outgoing mutations are rate limited according to the incoming rate decreased by the given factor; -# if above high ratio, the rate limiting is increased by the given factor; -# such factor is usually best configured between 1 and 10, use larger values for a faster recovery -# at the expense of potentially more dropped mutations; -# the rate limiting is applied according to the flow type: if FAST, it's rate limited at the speed of the fastest replica, -# if SLOW at the speed of the slowest one. -# New strategies can be added. Implementors need to implement org.apache.cassandra.net.BackpressureStrategy and -# provide a public constructor accepting a Map. -back_pressure_strategy: - - class_name: org.apache.cassandra.net.RateBasedBackPressure - parameters: - - high_ratio: 0.90 - factor: 5 - flow: FAST - -# Coalescing Strategies # -# Coalescing multiples messages turns out to significantly boost message processing throughput (think doubling or more). -# On bare metal, the floor for packet processing throughput is high enough that many applications won't notice, but in -# virtualized environments, the point at which an application can be bound by network packet processing can be -# surprisingly low compared to the throughput of task processing that is possible inside a VM. It's not that bare metal -# doesn't benefit from coalescing messages, it's that the number of packets a bare metal network interface can process -# is sufficient for many applications such that no load starvation is experienced even without coalescing. -# There are other benefits to coalescing network messages that are harder to isolate with a simple metric like messages -# per second. By coalescing multiple tasks together, a network thread can process multiple messages for the cost of one -# trip to read from a socket, and all the task submission work can be done at the same time reducing context switching -# and increasing cache friendliness of network message processing. -# See CASSANDRA-8692 for details. - -# Strategy to use for coalescing messages in OutboundTcpConnection. -# Can be fixed, movingaverage, timehorizon, disabled (default). -# You can also specify a subclass of CoalescingStrategies.CoalescingStrategy by name. -# otc_coalescing_strategy: DISABLED - -# How many microseconds to wait for coalescing. For fixed strategy this is the amount of time after the first -# message is received before it will be sent with any accompanying messages. For moving average this is the -# maximum amount of time that will be waited as well as the interval at which messages must arrive on average -# for coalescing to be enabled. -# otc_coalescing_window_us: 200 - -# Do not try to coalesce messages if we already got that many messages. This should be more than 2 and less than 128. -# otc_coalescing_enough_coalesced_messages: 8 - -# How many milliseconds to wait between two expiration runs on the backlog (queue) of the OutboundTcpConnection. -# Expiration is done if messages are piling up in the backlog. Droppable messages are expired to free the memory -# taken by expired messages. The interval should be between 0 and 1000, and in most installations the default value -# will be appropriate. A smaller value could potentially expire messages slightly sooner at the expense of more CPU -# time and queue contention while iterating the backlog of messages. -# An interval of 0 disables any wait time, which is the behavior of former Cassandra versions. -# -# otc_backlog_expiration_interval_ms: 200 - -# Track a metric per keyspace indicating whether replication achieved the ideal consistency -# level for writes without timing out. This is different from the consistency level requested by -# each write which may be lower in order to facilitate availability. -# ideal_consistency_level: EACH_QUORUM - -# Path to write full query log data to when the full query log is enabled -# The full query log will recrusively delete the contents of this path at -# times. Don't place links in this directory to other parts of the filesystem. -#full_query_log_dir: /tmp/cassandrafullquerylog diff --git a/stacks/dbrs/cassandra/conf/jvm-server.options-template b/stacks/dbrs/cassandra/conf/jvm-server.options-template deleted file mode 100644 index 4b90b4d..0000000 --- a/stacks/dbrs/cassandra/conf/jvm-server.options-template +++ /dev/null @@ -1,194 +0,0 @@ -########################################################################### -# jvm-server.options # -# # -# - all flags defined here will be used by cassandra to startup the JVM # -# - one flag should be specified per line # -# - lines that do not start with '-' will be ignored # -# - only static flags are accepted (no variables or parameters) # -# - dynamic flags will be appended to these on cassandra-env # -# # -# See jvm8-server.options and jvm11-server.options for Java version # -# specific options. # -########################################################################### - -###################### -# STARTUP PARAMETERS # -###################### - -# Uncomment any of the following properties to enable specific startup parameters - -# In a multi-instance deployment, multiple Cassandra instances will independently assume that all -# CPU processors are available to it. This setting allows you to specify a smaller set of processors -# and perhaps have affinity. -#-Dcassandra.available_processors=number_of_processors - -# The directory location of the cassandra.yaml file. -#-Dcassandra.config=directory - -# Sets the initial partitioner token for a node the first time the node is started. -#-Dcassandra.initial_token=token - -# Set to false to start Cassandra on a node but not have the node join the cluster. -#-Dcassandra.join_ring=true|false - -# Set to false to clear all gossip state for the node on restart. Use when you have changed node -# information in cassandra.yaml (such as listen_address). -#-Dcassandra.load_ring_state=true|false - -# Enable pluggable metrics reporter. See Pluggable metrics reporting in Cassandra 2.0.2. -#-Dcassandra.metricsReporterConfigFile=file - -# Set the port on which the CQL native transport listens for clients. (Default: 9042) -#-Dcassandra.native_transport_port=port - -# Overrides the partitioner. (Default: org.apache.cassandra.dht.Murmur3Partitioner) -#-Dcassandra.partitioner=partitioner - -# To replace a node that has died, restart a new node in its place specifying the address of the -# dead node. The new node must not have any data in its data directory, that is, it must be in the -# same state as before bootstrapping. -#-Dcassandra.replace_address=listen_address or broadcast_address of dead node - -# Allow restoring specific tables from an archived commit log. -#-Dcassandra.replayList=table - -# Allows overriding of the default RING_DELAY (30000ms), which is the amount of time a node waits -# before joining the ring. -#-Dcassandra.ring_delay_ms=ms - -# Set the SSL port for encrypted communication. (Default: 7001) -#-Dcassandra.ssl_storage_port=port - -# Set the port for inter-node communication. (Default: 7000) -#-Dcassandra.storage_port=port - -# Set the default location for the trigger JARs. (Default: conf/triggers) -#-Dcassandra.triggers_dir=directory - -# For testing new compaction and compression strategies. It allows you to experiment with different -# strategies and benchmark write performance differences without affecting the production workload. -#-Dcassandra.write_survey=true - -# To disable configuration via JMX of auth caches (such as those for credentials, permissions and -# roles). This will mean those config options can only be set (persistently) in cassandra.yaml -# and will require a restart for new values to take effect. -#-Dcassandra.disable_auth_caches_remote_configuration=true - -# To disable dynamic calculation of the page size used when indexing an entire partition (during -# initial index build/rebuild). If set to true, the page size will be fixed to the default of -# 10000 rows per page. -#-Dcassandra.force_default_indexing_page_size=true - -# Imposes an upper bound on hint lifetime below the normal min gc_grace_seconds -#-Dcassandra.maxHintTTL=max_hint_ttl_in_seconds - -#-Dpmem_path= -#-Dpool_size= - -######################## -# GENERAL JVM SETTINGS # -######################## - -# enable assertions. highly suggested for correct application functionality. --ea - -# disable assertions for net.openhft.** because it runs out of memory by design -# if enabled and run for more than just brief testing --da:net.openhft... - -# enable thread priorities, primarily so we can give periodic tasks -# a lower priority to avoid interfering with client workload --XX:+UseThreadPriorities - -# Enable heap-dump if there's an OOM --XX:+HeapDumpOnOutOfMemoryError - -# Per-thread stack size. --Xss256k - -# Larger interned string table, for gossip's benefit (CASSANDRA-6410) --XX:StringTableSize=1000003 - -# Make sure all memory is faulted and zeroed on startup. -# This helps prevent soft faults in containers and makes -# transparent hugepage allocation more effective. --XX:+AlwaysPreTouch - -# Disable biased locking as it does not benefit Cassandra. --XX:-UseBiasedLocking - -# Enable thread-local allocation blocks and allow the JVM to automatically -# resize them at runtime. --XX:+UseTLAB --XX:+ResizeTLAB -#-XX:+UseNUMA - -# http://www.evanjones.ca/jvm-mmap-pause.html --XX:+PerfDisableSharedMem - -# Prefer binding to IPv4 network intefaces (when net.ipv6.bindv6only=1). See -# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6342561 (short version: -# comment out this entry to enable IPv6 support). --Djava.net.preferIPv4Stack=true - -### Debug options - -# uncomment to enable flight recorder -#-XX:+UnlockCommercialFeatures -#-XX:+FlightRecorder - -# uncomment to have Cassandra JVM listen for remote debuggers/profilers on port 1414 -#-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1414 - -# uncomment to have Cassandra JVM log internal method compilation (developers only) -#-XX:+UnlockDiagnosticVMOptions -#-XX:+LogCompilation - -################# -# HEAP SETTINGS # -################# - -# Heap size is automatically calculated by cassandra-env based on this -# formula: max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB)) -# That is: -# - calculate 1/2 ram and cap to 1024MB -# - calculate 1/4 ram and cap to 8192MB -# - pick the max -# -# For production use you may wish to adjust this for your environment. -# If that's the case, uncomment the -Xmx and Xms options below to override the -# automatic calculation of JVM heap memory. -# -# It is recommended to set min (-Xms) and max (-Xmx) heap sizes to -# the same value to avoid stop-the-world GC pauses during resize, and -# so that we can lock the heap in memory on startup to prevent any -# of it from being swapped out. -#-Xms4G -#-Xmx4G - -# Young generation size is automatically calculated by cassandra-env -# based on this formula: min(100 * num_cores, 1/4 * heap size) -# -# The main trade-off for the young generation is that the larger it -# is, the longer GC pause times will be. The shorter it is, the more -# expensive GC will be (usually). -# -# It is not recommended to set the young generation size if using the -# G1 GC, since that will override the target pause-time goal. -# More info: http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html -# -# The example below assumes a modern 8-core+ machine for decent -# times. If in doubt, and if you do not particularly want to tweak, go -# 100 MB per physical CPU core. -#-Xmn800M - -################################### -# EXPIRATION DATE OVERFLOW POLICY # -################################### - -# Defines how to handle INSERT requests with TTL exceeding the maximum supported expiration date: -# * REJECT: this is the default policy and will reject any requests with expiration date timestamp after 2038-01-19T03:14:06+00:00. -# * CAP: any insert with TTL expiring after 2038-01-19T03:14:06+00:00 will expire on 2038-01-19T03:14:06+00:00 and the client will receive a warning. -# * CAP_NOWARN: same as previous, except that the client warning will not be emitted. -# -#-Dcassandra.expiration_date_overflow_policy=REJECT diff --git a/stacks/dbrs/cassandra/conf/jvm11-server.options b/stacks/dbrs/cassandra/conf/jvm11-server.options deleted file mode 100644 index 73bbc0f..0000000 --- a/stacks/dbrs/cassandra/conf/jvm11-server.options +++ /dev/null @@ -1,96 +0,0 @@ -########################################################################### -# jvm11-server.options # -# # -# See jvm-server.options. This file is specific for Java 11 and newer. # -########################################################################### - -################# -# GC SETTINGS # -################# - - - -### CMS Settings -#-XX:+UseConcMarkSweepGC -#-XX:+CMSParallelRemarkEnabled -#-XX:SurvivorRatio=8 -#-XX:MaxTenuringThreshold=1 -#-XX:CMSInitiatingOccupancyFraction=75 -#-XX:+UseCMSInitiatingOccupancyOnly -#-XX:CMSWaitDuration=10000 -#-XX:+CMSParallelInitialMarkEnabled -#-XX:+CMSEdenChunksRecordAlways -### some JVMs will fill up their heap when accessed via JMX, see CASSANDRA-6541 -#-XX:+CMSClassUnloadingEnabled --XX:+UseAdaptiveSizePolicy - - -### G1 Settings -## Use the Hotspot garbage-first collector. -#-XX:+UseG1GC -#-XX:+ParallelRefProcEnabled - -# -## Have the JVM do less remembered set work during STW, instead -## preferring concurrent GC. Reduces p99.9 latency. -#-XX:G1RSetUpdatingPauseTimePercent=5 -# -## Main G1GC tunable: lowering the pause target will lower throughput and vise versa. -## 200ms is the JVM default and lowest viable setting -## 1000ms increases throughput. Keep it smaller than the timeouts in cassandra.yaml. -#-XX:MaxGCPauseMillis=500 - -## Optional G1 Settings -# Save CPU time on large (>= 16GB) heaps by delaying region scanning -# until the heap is 70% full. The default in Hotspot 8u40 is 40%. -#-XX:InitiatingHeapOccupancyPercent=70 - -# For systems with > 8 cores, the default ParallelGCThreads is 5/8 the number of logical cores. -# Otherwise equal to the number of cores when 8 or less. -# Machines with > 10 cores should try setting these to <= full cores. -#-XX:ParallelGCThreads=16 -# By default, ConcGCThreads is 1/4 of ParallelGCThreads. -# Setting both to the same value can reduce STW durations. -#-XX:ConcGCThreads=16 - - -### JPMS - --Djdk.attach.allowAttachSelf=true ---add-exports java.base/jdk.internal.misc=ALL-UNNAMED ---add-exports java.base/jdk.internal.ref=ALL-UNNAMED ---add-exports java.base/sun.nio.ch=ALL-UNNAMED ---add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED ---add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED ---add-exports java.rmi/sun.rmi.server=ALL-UNNAMED ---add-exports java.sql/java.sql=ALL-UNNAMED - ---add-opens java.base/java.lang.module=ALL-UNNAMED ---add-opens java.base/jdk.internal.loader=ALL-UNNAMED ---add-opens java.base/jdk.internal.ref=ALL-UNNAMED ---add-opens java.base/jdk.internal.reflect=ALL-UNNAMED ---add-opens java.base/jdk.internal.math=ALL-UNNAMED ---add-opens java.base/jdk.internal.module=ALL-UNNAMED ---add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED ---add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED - - -### GC logging options -- uncomment to enable - -# Java 11 (and newer) GC logging options: -# See description of https://bugs.openjdk.java.net/browse/JDK-8046148 for details about the syntax -# The following is the equivalent to -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -#-Xlog:gc=info,heap*=trace,age*=debug,safepoint=info,promotion*=trace:file=/var/log/cassandra/gc.log:time,uptime,pid,tid,level:filecount=10,filesize=10485760 - -# Notes for Java 8 migration: -# -# -XX:+PrintGCDetails maps to -Xlog:gc*:... - i.e. add a '*' after "gc" -# -XX:+PrintGCDateStamps maps to decorator 'time' -# -# -XX:+PrintHeapAtGC maps to 'heap' with level 'trace' -# -XX:+PrintTenuringDistribution maps to 'age' with level 'debug' -# -XX:+PrintGCApplicationStoppedTime maps to 'safepoint' with level 'info' -# -XX:+PrintPromotionFailure maps to 'promotion' with level 'trace' -# -XX:PrintFLSStatistics=1 maps to 'freelist' with level 'trace' - -# The newline in the end of file is intentional \ No newline at end of file diff --git a/stacks/dbrs/cassandra/conf/jvm8-server.options b/stacks/dbrs/cassandra/conf/jvm8-server.options deleted file mode 100644 index 87297bc..0000000 --- a/stacks/dbrs/cassandra/conf/jvm8-server.options +++ /dev/null @@ -1,77 +0,0 @@ -########################################################################### -# jvm8-server.options # -# # -# See jvm-server.options. This file is specific for Java 8 and newer. # -########################################################################### - -######################## -# GENERAL JVM SETTINGS # -######################## - -# allows lowering thread priority without being root on linux - probably -# not necessary on Windows but doesn't harm anything. -# see http://tech.stolsvik.com/2010/01/linux-java-thread-priorities-workaround.html --XX:ThreadPriorityPolicy=42 - -################# -# GC SETTINGS # -################# - -### CMS Settings -#-XX:+UseParNewGC -#-XX:+UseConcMarkSweepGC -#-XX:+CMSParallelRemarkEnabled -#-XX:SurvivorRatio=8 -#-XX:MaxTenuringThreshold=1 -#-XX:CMSInitiatingOccupancyFraction=75 -#-XX:+UseCMSInitiatingOccupancyOnly -#-XX:CMSWaitDuration=10000 -#-XX:+CMSParallelInitialMarkEnabled -#-XX:+CMSEdenChunksRecordAlways -## some JVMs will fill up their heap when accessed via JMX, see CASSANDRA-6541 -#-XX:+CMSClassUnloadingEnabled --XX:+UseAdaptiveSizePolicy - -### G1 Settings -## Use the Hotspot garbage-first collector. -#-XX:+UseG1GC -#-XX:+ParallelRefProcEnabled - -# -## Have the JVM do less remembered set work during STW, instead -## preferring concurrent GC. Reduces p99.9 latency. -#-XX:G1RSetUpdatingPauseTimePercent=5 -# -## Main G1GC tunable: lowering the pause target will lower throughput and vise versa. -## 200ms is the JVM default and lowest viable setting -## 1000ms increases throughput. Keep it smaller than the timeouts in cassandra.yaml. -#-XX:MaxGCPauseMillis=500 - -## Optional G1 Settings -# Save CPU time on large (>= 16GB) heaps by delaying region scanning -# until the heap is 70% full. The default in Hotspot 8u40 is 40%. -#-XX:InitiatingHeapOccupancyPercent=70 - -# For systems with > 8 cores, the default ParallelGCThreads is 5/8 the number of logical cores. -# Otherwise equal to the number of cores when 8 or less. -# Machines with > 10 cores should try setting these to <= full cores. -#-XX:ParallelGCThreads=16 -# By default, ConcGCThreads is 1/4 of ParallelGCThreads. -# Setting both to the same value can reduce STW durations. -#-XX:ConcGCThreads=16 - -### GC logging options -- uncomment to enable - --XX:+PrintGCDetails --XX:+PrintGCDateStamps --XX:+PrintHeapAtGC --XX:+PrintTenuringDistribution --XX:+PrintGCApplicationStoppedTime --XX:+PrintPromotionFailure -#-XX:PrintFLSStatistics=1 -#-Xloggc:/var/log/cassandra/gc.log --XX:+UseGCLogFileRotation --XX:NumberOfGCLogFiles=10 --XX:GCLogFileSize=10M - -# The newline in the end of file is intentional diff --git a/stacks/dbrs/cassandra/licenses/README.md b/stacks/dbrs/cassandra/licenses/README.md deleted file mode 100644 index 18ad67d..0000000 --- a/stacks/dbrs/cassandra/licenses/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Additional details on licenses - -As with all Docker images, these likely also contain other software which may -be under other licenses (such as Bash, etc from the base distribution, along -with any direct or indirect dependencies of the primary software being -contained). As for any pre-built image usage, it is the image user's -responsibility to ensure that any use of this image complies with any relevant -licenses for all software contained within. diff --git a/stacks/dbrs/cassandra/licenses/cassandra_LICENSE b/stacks/dbrs/cassandra/licenses/cassandra_LICENSE deleted file mode 100644 index fd5ab5c..0000000 --- a/stacks/dbrs/cassandra/licenses/cassandra_LICENSE +++ /dev/null @@ -1,209 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -THIRD-PARTY DEPENDENCIES -======================== -Convenience copies of some third-party dependencies are distributed with -Apache Cassandra as Java jar files in lib/. Licensing information for -these files can be found in the lib/licenses directory. \ No newline at end of file diff --git a/stacks/dbrs/cassandra/licenses/clear_LICENSE b/stacks/dbrs/cassandra/licenses/clear_LICENSE deleted file mode 100644 index 3f0c923..0000000 --- a/stacks/dbrs/cassandra/licenses/clear_LICENSE +++ /dev/null @@ -1,147 +0,0 @@ - -List of licenses used in Clear Linux OS. - -This list is automatically generated. If you spot a mistake or -omission, please mention this on dev@lists.clearlinux.org. - -To read the full license text for these licenses, please visit -http://spdx.org/licenses/. A few licenses in this list are not -declared on the http://spdx.org/licenses/ website, they are listed -at the bottom of this list. - -AFL-2.0 -AFL-2.1 -AGPL-3.0 -AML -APSL-2.0 -Apache-1.1 -Apache-2.0 -Artistic-1.0 -Artistic-1.0-Perl -Artistic-2.0 -BSD-2-Clause -BSD-2-Clause-FreeBSD -BSD-2-Clause-NetBSD -BSD-3-Clause -BSD-3-Clause-Attribution -BSD-3-Clause-Clear -BSD-3-Clause-LBNL -BSD-4-Clause -BSD-4-Clause-UC -BSL-1.0 -CC-BY-2.0 -CC-BY-3.0 -CC-BY-4.0 -CC-BY-ND-4.0 -CC-BY-SA-2.0 -CC-BY-SA-3.0 -CC-BY-SA-4.0 -CC0-1.0 -CDDL-1.0 -CDDL-1.1 -CECILL-1.1 -CPL-1.0 -ClArtistic -Distributable -EPL-1.0 -FSFULLR -FTL -GFDL-1.1 -GFDL-1.2 -GFDL-1.3 -GFDL-1.3+ -GL2PS -GPL-1.0 -GPL-1.0+ -GPL-2.0 -GPL-2.0+ -GPL-2.0-only -GPL-2.0-or-later -GPL-3.0 -GPL-3.0+ -GPL-3.0-only -HPND -ICU -IJG -ISC -ImageMagick -Imlib2 -Intel -JSON -JasPer-2.0 -LAL-1.2 -LGPL-2.0 -LGPL-2.0+ -LGPL-2.1 -LGPL-2.1+ -LGPL-2.1-only -LGPL-3.0 -LGPL-3.0+ -LPPL-1.0 -LPPL-1.3c -Libpng -MIT -MIT-Opengroup -MIT-enna -MIT-feh -MPL-1.1 -MPL-2.0 -MPL-2.0-no-copyleft-exception -MS-PL -MTLL -MakeIndex -NCSA -NTP -NetCDF -Nunit -OFL-1.0 -OFL-1.1 -OLDAP-2.0.1 -OLDAP-2.8 -OML -OSL-2.0 -OpenSSL -PHP-3.01 -PostgreSQL -Public-Domain -Python-2.0 -QPL-1.0 -Qhull -Rdisc -Ruby -SAX-PD -SGI-B-1.0 -SGI-B-1.1 -SGI-B-2.0 -SISSL -Saxpath -Sleepycat -TCL -Unicode-TOU -Unlicense -Vim -W3C -W3C-19980720 -WTFPL -X11 -ZPL-2.0 -ZPL-2.1 -Zend-2.0 -Zlib -bzip2-1.0.5 -bzip2-1.0.6 -gnuplot -libtiff -psutils -zlib-acknowledgement - -The following licenses are not standard spdx identifiers: -- Copyright -- Distributable -- Public-Domain - -These are used for projects that have explicitly granted redistribution -of the project source code, but don't have a typical OSI approved -license identifier. - - diff --git a/stacks/dbrs/cassandra/scripts/build-cassandra-pmem.sh b/stacks/dbrs/cassandra/scripts/build-cassandra-pmem.sh deleted file mode 100755 index d6e6928..0000000 --- a/stacks/dbrs/cassandra/scripts/build-cassandra-pmem.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -#Script for building cassandra with pmem support on Clear Linux -#Bundle dependencies: c-basic java-basic devpkg-pmdk pmdk -# -#All the repositories are built on CASSANDRA_BUILD_DIR and a tar.gz file is generated -#on the folder you run this script -export JAVA_HOME='/usr/lib/jvm/java-1.8.0-openjdk' - -INITIAL_DIR=$(pwd) -CASSANDRA_BUILD_DIR='/tmp/cassandra-build' -LLPL_REPO='https://github.com/pmem/llpl.git' -CASSANDRA_PMEM_REPO='https://github.com/intel/cassandra-pmem' -CASSANDRA_PMEM_BRANCH='13981_llpl_engine' - -if [ -d $CASSANDRA_BUILD_DIR ] -then - rm -rf $CASSANDRA_BUILD_DIR/* -else - mkdir $CASSANDRA_BUILD_DIR -fi - -#Build LLPL -cd $CASSANDRA_BUILD_DIR -git clone $LLPL_REPO && \ -cd $CASSANDRA_BUILD_DIR/llpl && \ -make && \ -cd $CASSANDRA_BUILD_DIR/llpl/target/classes && \ -jar cvf llpl.jar lib/ - - -#Build Cassandra PMEM -cd $CASSANDRA_BUILD_DIR && \ -git clone -b $CASSANDRA_PMEM_BRANCH --single-branch $CASSANDRA_PMEM_REPO && \ -cd $CASSANDRA_BUILD_DIR/cassandra-pmem && \ -cp $CASSANDRA_BUILD_DIR/llpl/target/classes/llpl.jar $CASSANDRA_BUILD_DIR/cassandra-pmem/lib/ && \ -cp $CASSANDRA_BUILD_DIR/llpl/target/cppbuild/libllpl.so $CASSANDRA_BUILD_DIR/cassandra-pmem/lib/sigar-bin/ && \ -ant -autoproxy && \ -cd $CASSANDRA_BUILD_DIR && \ -mv cassandra-pmem cassandra -tar -zcvf cassandra-pmem-build.tar.gz cassandra -mv cassandra-pmem-build.tar.gz $INITIAL_DIR -cd $INITIAL_DIR diff --git a/stacks/dbrs/cassandra/scripts/change_devdax_perms.sh b/stacks/dbrs/cassandra/scripts/change_devdax_perms.sh deleted file mode 100755 index 8d23a0e..0000000 --- a/stacks/dbrs/cassandra/scripts/change_devdax_perms.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -/usr/bin/chown cassandra-user /dev/dax0.0 diff --git a/stacks/dbrs/cassandra/scripts/change_fsdax_perms.sh b/stacks/dbrs/cassandra/scripts/change_fsdax_perms.sh deleted file mode 100755 index 13e5311..0000000 --- a/stacks/dbrs/cassandra/scripts/change_fsdax_perms.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -/usr/bin/chown cassandra-user -R /mnt/pmem -/usr/bin/chmod a+rw -R /mnt/pmem diff --git a/stacks/dbrs/cassandra/scripts/change_persistent_dirs_perms.sh b/stacks/dbrs/cassandra/scripts/change_persistent_dirs_perms.sh deleted file mode 100755 index 02ec2a4..0000000 --- a/stacks/dbrs/cassandra/scripts/change_persistent_dirs_perms.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -DATA_DIR="/workspace/cassandra/data" -LOG_DIR="/workspace/cassandra/logs" - -/usr/bin/chown cassandra-user -R $DATA_DIR -/usr/bin/chown cassandra-user -R $LOG_DIR diff --git a/stacks/dbrs/cassandra/scripts/docker-entrypoint.sh b/stacks/dbrs/cassandra/scripts/docker-entrypoint.sh deleted file mode 100755 index 66630f9..0000000 --- a/stacks/dbrs/cassandra/scripts/docker-entrypoint.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash -set -x - -#Work in a copy -ORIG_CONFIG_FILE="/workspace/cassandra/conf/cassandra.yaml" -CONFIG_FILE="/workspace/cassandra/conf/cassandra-template.yaml" -ORIG_JVM_OPTIONS_FILE="/workspace/cassandra/conf/jvm-server.options" -JVM_OPTIONS_FILE="/workspace/cassandra/conf/jvm-server.options-template" -SUDOERS_FILE="/etc/sudoers.d/cassandra-user" - -function grant_persistent_dirs_permissions { - sudo /usr/local/bin/change_persistent_dirs_perms.sh -} - -function grant_pmem_permissions { - if [ -d /mnt/pmem ] - then - sudo /usr/local/bin/change_fsdax_perms.sh - elif [ -e /dev/dax0.0 ] - then - sudo /usr/local/bin/change_devdax_perms.sh - else - echo "No pmem devices are attached to the container on /mnt/pmem(fsdax) or /dev/dax(devdax)!" - exit 1 - fi -} - -function create_jvm_options { - #function to create jvm-server.options file at runtime - echo "Generating jvm-server.options file" - #Determining if the image is going to use devdax or fsdax devices for pmem - if [ -d /mnt/pmem ] - then - CASSANDRA_FSDAX_POOL_SIZE_GB=${CASSANDRA_FSDAX_POOL_SIZE_GB:-'1'} - CASSANDRA_PMEM_POOL_NAME=${CASSANDRA_PMEM_POOL_NAME:-'cassandra_pool'} - echo -e "-Dpmem_path=/mnt/pmem/$CASSANDRA_PMEM_POOL_NAME\n-Dpool_size=$(echo $(( $CASSANDRA_FSDAX_POOL_SIZE_GB * 1073741824 )) )" | tee -a $JVM_OPTIONS_FILE - elif [ -e /dev/dax0.0 ] - then - echo -e "-Dpmem_path=/dev/dax0.0\n-Dpool_size=0" | tee -a $JVM_OPTIONS_FILE - else - echo "No pmem devices are attached to the container!" - exit 1 - fi - - #Copy generated config file to the default location - echo "Copying generated jvm-server.options template to default config location..." - cp $JVM_OPTIONS_FILE $ORIG_JVM_OPTIONS_FILE -} - -function create_cassandra_yaml { - #Function to create cassandra.yaml file at runtime - echo "Generating cassandra.yaml file" - #Get container IP Address on the first interface - echo "Getting container primary IP address..." - CONTAINER_IP=$(ip address | grep inet | egrep -v "inet6|127.0.0.1" | awk '{print $2}' | awk -F "/" '{print $1}' | head -1) - echo "The container IP address is: $CONTAINER_IP" - - #Cluster name - CASSANDRA_CLUSTER_NAME=${CASSANDRA_CLUSTER_NAME:-'Cassandra Cluster'} - echo "cluster_name: '$CASSANDRA_CLUSTER_NAME'" | tee -a $CONFIG_FILE - - #Listen address - CASSANDRA_LISTEN_ADDRESS=${CASSANDRA_LISTEN_ADDRESS:-$CONTAINER_IP} - echo "listen_address: '$CASSANDRA_LISTEN_ADDRESS'" | tee -a $CONFIG_FILE - - #Seed addresses - CASSANDRA_SEED_ADDRESSES=${CASSANDRA_SEED_ADDRESSES:-"$CASSANDRA_LISTEN_ADDRESS:7000"} - echo -e "seed_provider:\n - class_name: org.apache.cassandra.locator.SimpleSeedProvider\n parameters:\n - seeds: '$CASSANDRA_SEED_ADDRESSES'" | tee -a $CONFIG_FILE - - #Snitch - CASSANDRA_SNITCH=${CASSANDRA_SNITCH:-'SimpleSnitch'} - echo "endpoint_snitch: $CASSANDRA_SNITCH" | tee -a $CONFIG_FILE - - #RPC listen addresss - CASSANDRA_RPC_ADDRESS=${CASSANDRA_RPC_ADDRESS:-$CONTAINER_IP} - echo "rpc_address: $CASSANDRA_RPC_ADDRESS" | tee -a $CONFIG_FILE - - #Copy generated config file to the default location - echo "Copying generated cassandra.yaml template to default config location..." - cp $CONFIG_FILE $ORIG_CONFIG_FILE -} - -grant_persistent_dirs_permissions -grant_pmem_permissions - -#Creating jvm-server.options if none provided -if [ ! -f $ORIG_JVM_OPTIONS_FILE ] -then - create_jvm_options -else - echo "Using mounted jvm-server.options file..." -fi -#creating cassandra.yaml if none provided -if [ ! -f $ORIG_CONFIG_FILE ] -then - create_cassandra_yaml -else - echo "Using mounted cassandra.yaml file..." -fi - -echo "Starting Cassandra..." - -# first arg is `-f` or `--some-option` -# or there are no args -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - set -- /workspace/cassandra/bin/cassandra "$@" -fi - -exec "$@" diff --git a/stacks/dbrs/cassandra/scripts/docker-healthcheck b/stacks/dbrs/cassandra/scripts/docker-healthcheck deleted file mode 100755 index 3849ba1..0000000 --- a/stacks/dbrs/cassandra/scripts/docker-healthcheck +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -eo pipefail - -host="$(hostname --ip-address || echo '127.0.0.1')" -port="$(cat /workspace/cassandra/conf/cassandra.yaml | grep 'native_transport_port:' | tail -1 | awk '{print $2}' || echo '9042' )" - -if /workspace/cassandra/bin/cqlsh "$host" "$port" < /dev/null; then - exit 0 -fi - -exit 1 diff --git a/stacks/dbrs/redis/Dockerfile b/stacks/dbrs/redis/Dockerfile deleted file mode 100644 index 14f5093..0000000 --- a/stacks/dbrs/redis/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM clearlinux AS build-redis - -RUN swupd bundle-add --quiet --no-progress git c-basic devpkg-ndctl curl package-utils - -RUN clr_ver=$(grep VERSION_ID /usr/lib/os-release | awk -F= '{print $2}') && \ - NUMA_DEV="https://cdn.download.clearlinux.org/releases/$clr_ver/clear/x86_64/os/Packages/numactl-dev-2.0.12-20.x86_64.rpm" && \ - NUMA_LIB="https://cdn.download.clearlinux.org/releases/$clr_ver/clear/x86_64/os/Packages/numactl-lib-2.0.12-20.x86_64.rpm" && \ - rpm -ihv --nodeps $NUMA_DEV $NUMA_LIB - -RUN useradd redis-user - -ENV REDIS_PMEMD="/tmp/redis" -ENV EXTRA_CFLAGS=" -Wno-error" -RUN git clone https://github.com/pmem/pmem-redis $REDIS_PMEMD && \ - cd $REDIS_PMEMD && \ - git submodule init && git submodule update && \ - make USE_NVM=yes install - -FROM clearlinux/os-core:latest - -RUN useradd redis-user - -COPY scripts/docker-entrypoint.sh scripts/docker-healthcheck /usr/bin/ -COPY --from=build-redis /usr/bin/ps /usr/bin/ -COPY --from=build-redis /usr/local/bin/* /usr/bin/ -COPY --from=build-redis /usr/lib64/libnuma.so* /usr/lib64/libprocps.so* /usr/lib64/ - -HEALTHCHECK --interval=15s CMD ["docker-healthcheck"] - -ENTRYPOINT ["docker-entrypoint.sh"] -USER redis-user -CMD echo "USE: redis-server --nvm-maxcapacity --nvm-dir --nvm-threshold " && redis-server --help diff --git a/stacks/dbrs/redis/README.md b/stacks/dbrs/redis/README.md deleted file mode 100644 index 9156476..0000000 --- a/stacks/dbrs/redis/README.md +++ /dev/null @@ -1,76 +0,0 @@ -## Database Reference Stack with Redis - -[![](https://images.microbadger.com/badges/image/clearlinux/stacks-dbrs-redis.svg)](http://microbadger.com/images/clearlinux/stacks-dbrs-redis "Get your own image badge on microbadger.com") - -### Building Locally - -The Dockerfiles for all Clear Linux* OS based container images are available at [dockerfiles repository](https://github.com/clearlinux/dockerfiles). These can be used to build and modify the container images. - -1. Clone the clearlinux/dockerfiles repository. - - ```bash - git clone https://github.com/clearlinux/dockerfiles.git - ``` - -2. Change to the directory of the application: - - ```bash - cd dockerfiles/stacks/dbrs/redis - ``` - -3. Build the container image. Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg - - ```bash - docker build --no-cache -t clearlinux/stacks-dbrs-redis . - ``` - -### Clone the repository - - - -### Run DBRS Redis as a standalone container - -Prior to start the application, you will need to have the DCPMM in fsdax mode with a file system and mounted in `/mnt/dax0`. To know how to configure, read the [DBRS guide](https://docs.01.org/clearlinux/latest/guides/stacks/dbrs.html) - -To start the application - -```bash -docker run --mount type=bind,source=/mnt/dax0,target=/mnt/pmem0 -i -d --name pmem-redis ${DOCKER_IMAGE} --nvm-maxcapacity 200 --nvm-dir /mnt/pmem0 --nvm-threshold 64 --protected-mode no -``` - -### Deploy DBRS Redis cluster on Kubernetes - -#### Kubernetes installation - -To install Kubernetes in Clear Linux, follow the instructions in the Clear Linux's [Kubernetes Tutorial](https://docs.01.org/clearlinux/latest/tutorials/kubernetes.html) - -After setting up Kubernetes, you will need to enable it to support DCPMM suing the pmem-csi driver. To install the driver follow the instructions in the [pmem-csi repository](https://github.com/intel/pmem-csi) file. - -#### Redis operator install - -The source code of the redis operator can be found in this [repository](https://github.com/spotahome/redis-operator). - -To install the operator, go to you kubernetes control plane and execute the following command: - -```bash -kubectl create -f https://raw.githubusercontent.com/spotahome/redis-operator/master/example/operator/all-redis-operator-resources.yaml -``` - -#### Redis operator usage - -After installing the operator you are ready to deploy redisfailover instances using a yaml file, there is an example for persistent memory [here](https://github.com/spotahome/redis-operator/blob/master/example/redisfailover/pmem.yaml). You can download it and change the source of the image to clearlinux/stacks-dbrs-redis. We have created our own yaml based on this example, you can find it in this repo with the name: `redis-failover.yml` - -In the `redis-failover.yml` there is a placeholder for the image name, substitute the word `PMEM_REDIS_IMAGE` with the name of the clearlinux/stacks-dbrs-redis image. - -To start a redisfailover instance in Kubernetes using our yaml, move the file to the kubernetes server, then run: - -```bash -kubectl create -f redis-failover.yml -``` - -##### Known issues - -There is an issue of the sentinels not having enough memory to create the InitContainer. The issue has been reported [here](https://github.com/spotahome/redis-operator/issues/176). The current workaround is to build the image increasing the limits for the InitContainer memory to 32Mb - -**Note** -If you already have a redis-operator, you will need to delete it before installing a new one. diff --git a/stacks/dbrs/redis/licenses/README.md b/stacks/dbrs/redis/licenses/README.md deleted file mode 100644 index 18ad67d..0000000 --- a/stacks/dbrs/redis/licenses/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Additional details on licenses - -As with all Docker images, these likely also contain other software which may -be under other licenses (such as Bash, etc from the base distribution, along -with any direct or indirect dependencies of the primary software being -contained). As for any pre-built image usage, it is the image user's -responsibility to ensure that any use of this image complies with any relevant -licenses for all software contained within. diff --git a/stacks/dbrs/redis/licenses/clear_LICENSE b/stacks/dbrs/redis/licenses/clear_LICENSE deleted file mode 100644 index 3f0c923..0000000 --- a/stacks/dbrs/redis/licenses/clear_LICENSE +++ /dev/null @@ -1,147 +0,0 @@ - -List of licenses used in Clear Linux OS. - -This list is automatically generated. If you spot a mistake or -omission, please mention this on dev@lists.clearlinux.org. - -To read the full license text for these licenses, please visit -http://spdx.org/licenses/. A few licenses in this list are not -declared on the http://spdx.org/licenses/ website, they are listed -at the bottom of this list. - -AFL-2.0 -AFL-2.1 -AGPL-3.0 -AML -APSL-2.0 -Apache-1.1 -Apache-2.0 -Artistic-1.0 -Artistic-1.0-Perl -Artistic-2.0 -BSD-2-Clause -BSD-2-Clause-FreeBSD -BSD-2-Clause-NetBSD -BSD-3-Clause -BSD-3-Clause-Attribution -BSD-3-Clause-Clear -BSD-3-Clause-LBNL -BSD-4-Clause -BSD-4-Clause-UC -BSL-1.0 -CC-BY-2.0 -CC-BY-3.0 -CC-BY-4.0 -CC-BY-ND-4.0 -CC-BY-SA-2.0 -CC-BY-SA-3.0 -CC-BY-SA-4.0 -CC0-1.0 -CDDL-1.0 -CDDL-1.1 -CECILL-1.1 -CPL-1.0 -ClArtistic -Distributable -EPL-1.0 -FSFULLR -FTL -GFDL-1.1 -GFDL-1.2 -GFDL-1.3 -GFDL-1.3+ -GL2PS -GPL-1.0 -GPL-1.0+ -GPL-2.0 -GPL-2.0+ -GPL-2.0-only -GPL-2.0-or-later -GPL-3.0 -GPL-3.0+ -GPL-3.0-only -HPND -ICU -IJG -ISC -ImageMagick -Imlib2 -Intel -JSON -JasPer-2.0 -LAL-1.2 -LGPL-2.0 -LGPL-2.0+ -LGPL-2.1 -LGPL-2.1+ -LGPL-2.1-only -LGPL-3.0 -LGPL-3.0+ -LPPL-1.0 -LPPL-1.3c -Libpng -MIT -MIT-Opengroup -MIT-enna -MIT-feh -MPL-1.1 -MPL-2.0 -MPL-2.0-no-copyleft-exception -MS-PL -MTLL -MakeIndex -NCSA -NTP -NetCDF -Nunit -OFL-1.0 -OFL-1.1 -OLDAP-2.0.1 -OLDAP-2.8 -OML -OSL-2.0 -OpenSSL -PHP-3.01 -PostgreSQL -Public-Domain -Python-2.0 -QPL-1.0 -Qhull -Rdisc -Ruby -SAX-PD -SGI-B-1.0 -SGI-B-1.1 -SGI-B-2.0 -SISSL -Saxpath -Sleepycat -TCL -Unicode-TOU -Unlicense -Vim -W3C -W3C-19980720 -WTFPL -X11 -ZPL-2.0 -ZPL-2.1 -Zend-2.0 -Zlib -bzip2-1.0.5 -bzip2-1.0.6 -gnuplot -libtiff -psutils -zlib-acknowledgement - -The following licenses are not standard spdx identifiers: -- Copyright -- Distributable -- Public-Domain - -These are used for projects that have explicitly granted redistribution -of the project source code, but don't have a typical OSI approved -license identifier. - - diff --git a/stacks/dbrs/redis/licenses/redis_LICENSE b/stacks/dbrs/redis/licenses/redis_LICENSE deleted file mode 100644 index c05bb37..0000000 --- a/stacks/dbrs/redis/licenses/redis_LICENSE +++ /dev/null @@ -1,10 +0,0 @@ -Copyright (c) 2006-2015, Salvatore Sanfilippo -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Redis nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/stacks/dbrs/redis/redis-failover.yml b/stacks/dbrs/redis/redis-failover.yml deleted file mode 100644 index 54362a7..0000000 --- a/stacks/dbrs/redis/redis-failover.yml +++ /dev/null @@ -1,44 +0,0 @@ -apiVersion: databases.spotahome.com/v1 -kind: RedisFailover -metadata: - name: redisfailover-pmem -spec: - sentinel: - replicas: 3 - command: - - "redis-server" - - "/redis/sentinel.conf" - - "--sentinel" - - "--protected-mode" - - "no" - redis: - securityContext: - runAsUser: 1000 - runAsGroup: 1000 - fsGroup: 1000 - replicas: 3 - image: PMEM_REDIS_IMAGE - command: - - "redis-server" - - "/redis/redis.conf" - - "--nvm-maxcapacity" - - "200" - - "--nvm-dir" - - "/data" - - "--nvm-threshold" - - "44" - - "--protected-mode" - - "no" - - "--dir" - - "/tmp" - storage: - persistentVolumeClaim: - metadata: - name: redisfailover-pmem-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi - storageClassName: pmem-csi-sc-ext4 diff --git a/stacks/dbrs/redis/scripts/docker-entrypoint.sh b/stacks/dbrs/redis/scripts/docker-entrypoint.sh deleted file mode 100755 index 8ea8996..0000000 --- a/stacks/dbrs/redis/scripts/docker-entrypoint.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -x - -if [ -d /mnt/pmem0 ] -then - chown redis-user -R /mnt/pmem0/ - chmod -R a+rw /mnt/pmem0 -else - echo "No pmem devices (fsdax) are attached to the container on /mnt/pmem0" - exit 1 -fi - -if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then - set -- redis-server "$@" -fi - -exec "$@" diff --git a/stacks/dbrs/redis/scripts/docker-healthcheck b/stacks/dbrs/redis/scripts/docker-healthcheck deleted file mode 100755 index 44c3aeb..0000000 --- a/stacks/dbrs/redis/scripts/docker-healthcheck +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -srv=$(ps -C redis-server -o pid=) -cli=$(ps -C redis-cli -o pid=) -bench=$(ps -C redis-benchmark -o pid=) -sentinel=$(ps -C redis-sentinel -o pid=) - -if [[ ! -z "$srv$cli$bench$sentinel" ]]; then - exit 0 -fi - -exit 1 diff --git a/stacks/dbrs/releasenote.md b/stacks/dbrs/releasenote.md deleted file mode 100644 index ab32821..0000000 --- a/stacks/dbrs/releasenote.md +++ /dev/null @@ -1,79 +0,0 @@ - -# Database Reference Stack - -The Database Reference Stack, an integrated, highly-performant open source stack optimized for next-generation 2nd Generation Intel® Xeon® Scalable processors with Intel® Optane™ DC persistent memory. This open source community release is part of our effort to ensure datacenters can reduce the bottlenecks and data latency by implementing intelligent, scalable and cost-effective storage mechanisms. The Database Reference Stack boosts the performance of data-intensive applications using traditional SSD storage drives by using DIMM modules as a persistant system storage. - -> **Note:** - For more information regarding Intel® Optane™ DC persistent memory please visit the [official Optane web page](https://www.intel.com/content/www/us/en/architecture-and-technology/intel-optane-technology.html). - - -# The Database Reference Stack Releases - -To offer more flexibility, we are releasing multiple versions of the Database Reference Stack. All versions are built on top of the Clear Linux OS, which is optimized for I/O. - -> **Note:** - Clear Linux will be automatically updated to the latest release version in the container. The minimum validated version of Clear Linux for this stack is 30770. - - -## The Database Reference Stack with Cassandra - -The release includes: - * Clear Linux* OS - * Cassandra 4.0 with persistent memory feature in App-Direct mode. - * PMDK 1.5.1 library as the storage engine - * openjdk 1.8.0 - -> **Note:** - The PMDK library support has been added to the kernel since version 4.9, however it has more estability on kernel versions 5.0+ - - -## The Database Reference Stack with Redis - -The release includes: - * Clear Linux* OS - * Redis 4.0 with persistent memory feature in App-Direct mode. - * memkind 1.9.0 library as the storage engine - -## How to get the Database Reference Stack - -The official Database Reference Stack Docker images are hosted at: https://hub.docker.com/u/clearlinux/: - - * Pull from the [Cassandra image](https://hub.docker.com/r/clearlinux/stacks-dbrs-cassandra) - * Pull from the [Redis image](https://hub.docker.com/r/clearlinux/stacks-dbrs-redis) - - -# Licensing - -The Database Reference Stack is guided by the same [Terms of Use](https://download.clearlinux.org/TermsOfUse.html) declared by the Clear Linux project. The Docker images are hosted on https://hub.docker.com and as with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc. from the base distribution, along with any direct or indirect dependencies of the primary software being contained). - - -# Working with the Database Reference Stack - -The components of the Database Reference stack where selected because they support use of DCPMM in App-Direct Mode. - -The images can be used in a Kubernetes cluster as a multi-node environment. To enable DCPMM support in Kubernetes, it is required to use the [pmem-csi driver](https://github.com/intel/pmem-csi) to create the storage classes which will map to the DCPMM regions in fsdax mode. - -Please refer to the [Database Reference Stack tutorial](https://docs.01.org/clearlinux/latest/guides/stacks/dbrs.html) for detailed instructions for running the benchmarks on the docker images. - - -# Contributing to the Database Reference Stack - -We encourage your contributions to this project, through the established Clear Linux community tools. Our team uses typical open source collaboration tools that are described on the Clear Linux [community page](https://clearlinux.org/community). - - -# Reporting Security Issues - - If you have discovered potential security vulnerability in an Intel product, please contact the iPSIRT at secure@intel.com. - - It is important to include the following details: - - * The products and versions affected - * Detailed description of the vulnerability - * Information on known exploits - - Vulnerability information is extremely sensitive. The iPSIRT strongly recommends that all security vulnerability reports sent to Intel be encrypted using the iPSIRT PGP key. The PGP key is available here: https://www.intel.com/content/www/us/en/security-center/pgp-public-key.html - - Software to encrypt messages may be obtained from: - - * PGP Corporation - * GnuPG diff --git a/stacks/dlrs/README.md b/stacks/dlrs/README.md deleted file mode 100644 index 2e8fabf..0000000 --- a/stacks/dlrs/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Deep Learning Reference Stack - -This provides the Deep Learning Reference Stack. To offer more flexibility, there are multiple versions of the Deep Learning Reference Stack: -* Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN) primitives and AVX-512 Deep Learning Boost (formerly known as AVX-512 VNNI) -* Eigen optimized for Intel Architecture -* Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN) primitives -* OSS PyTorch DLRS Docker image -* PyTorch DLRS Docker image w/ Intel® Math Kernel Library - -Please see the folders in this level about the variants and how to build and use them. diff --git a/stacks/dlrs/kubeflow/README.md b/stacks/dlrs/kubeflow/README.md deleted file mode 100644 index 72e5764..0000000 --- a/stacks/dlrs/kubeflow/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubeflow Specific Files - -This folder is home for kubeflow specific files to enable DLRS images with various workloads that exist as part of kubeflow. diff --git a/stacks/dlrs/kubeflow/dlrs-pytorchjob/README.md b/stacks/dlrs/kubeflow/dlrs-pytorchjob/README.md deleted file mode 100644 index 802db1d..0000000 --- a/stacks/dlrs/kubeflow/dlrs-pytorchjob/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# PyTorch Training (PyTorch Job) with Kubeflow and DLRS - -A [PyTorch Job](https://www.kubeflow.org/docs/components/pytorch/) is Kubeflow's custom resource used to run PyTorch training jobs on Kubernetes. - -## Submitting PyTorch Jobs - -In this folder you will find PyToch Job examples that use the Deep Learning Reference Stack as base image for creating the container(s) that will run training workloads in your Kubernetes cluster. -Select one form the list below: - -* [Pytorch CNN Benchmarks](https://github.com/clearlinux/dockerfiles/tree/master/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks) diff --git a/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/Dockerfile b/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/Dockerfile deleted file mode 100644 index f88750a..0000000 --- a/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM clearlinux/stacks-pytorch-mkl:v0.4.0 - -WORKDIR /var -COPY cnn_benchmarks.py /var - -ENTRYPOINT ["mpirun", "-n", "1", "--allow-run-as-root", "python", "/var/cnn_benchmarks.py"] diff --git a/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/README.md b/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/README.md deleted file mode 100644 index a790aed..0000000 --- a/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Training PyTorch CNN Benchmarks - -This directory contains code to train convolutional neural networks using cnn_benchmarks. - -## Build Image - -The PyTorch Job consumes a custom DLRS image for deployment. The default image name and tag is project-name/stacks-pytorch-kf-mkl:0.4.0; you should change the image name to match your project and make the proper changes in pytorch_job_cnn_benchmarks.yaml. - -```bash -docker build -f Dockerfile -t project-name/stacks-pytorch-kf-mkl:0.4.0 . -``` diff --git a/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/cnn_benchmarks.py b/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/cnn_benchmarks.py deleted file mode 100644 index 1a8b5ff..0000000 --- a/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/cnn_benchmarks.py +++ /dev/null @@ -1,219 +0,0 @@ -#!/usr/bin/env python -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# For more information, please refer to -"""mini cnn benchmarks in pytorch to identify regression issues""" - -import argparse -from collections import namedtuple -import logging -import multiprocessing as mps -import os -import platform -import subprocess -import time - -import torch -import torchvision.models as models -import torch.nn as nn -import torch.optim as optim - - -class BenchMarks: - """set of convnet benchmarks""" - - Model = namedtuple("Model", "name model batch") - alexnet = Model(name="alexnet", model=models.alexnet, batch=(64, 224, 224)) - resnet18 = Model(name="resnet18", model=models.resnet18, batch=(128, 224, 224)) - resnet50 = Model(name="resnet50", model=models.resnet50, batch=(256, 224, 224)) - vgg16 = Model(name="vgg16", model=models.vgg16, batch=(256, 224, 224)) - squeezenet = Model( - name="squeezenet", model=models.squeezenet1_1, batch=(256, 224, 224) - ) - - def select(self, model_name=None): - """select models to be run""" - logging.info("Run details") - logging.info("=" * 71) - models = [ - self.alexnet, - self.resnet18, - self.resnet50, - self.vgg16, - self.squeezenet, - ] - if model_name: - self.models = [ - model for model in models for name in model_name if name == model.name - ] - logging.info("Selected model(s) :: ") - for m in self.models: - logging.info("%s ------------- Batchsize :: %s " % (m.name, m.batch)) - logging.info("=" * 71) - - @staticmethod - def synth_data(batch): - channel = 3 - batch_size = batch[0] - height = batch[1] - weight = batch[2] - inp_data = torch.rand(batch_size, channel, height, weight) - label = torch.arange(1, batch_size + 1).long() - return inp_data, label - - def main(self, models, dry_run=True): - if not dry_run: - self.select(models) - if not self.models: - logging.info("Requested model(s) not available") - for m in self.models: - logging.info("=" * 71) - logging.info("Running an instance of :: %s" % m.name) - self.run(m) - - def run(self, model_tuple): - """Run each model `step` times""" - t_forward, t_backward, t_update = 0, 0, 0 - steps = 10 - model, batch = model_tuple.model(), model_tuple.batch - learning_rate = 0.01 - input_data, label = BenchMarks.synth_data(batch) - optimizer = optim.SGD(model.parameters(), lr=learning_rate) - loss_fn = nn.CrossEntropyLoss() - model.eval() - optimizer.zero_grad() - logging.info("Number of iterations :: %d" % steps) - logging.info("Learning rate:: %f" % learning_rate) - for _ in range(steps): - t_1 = time.time() - output = model(input_data) - t_2 = time.time() - loss = loss_fn(output, label) - loss.backward() - t_3 = time.time() - optimizer.step() - t_4 = time.time() - t_forward += t_2 - t_1 - t_backward += t_3 - t_2 - t_update += t_4 - t_2 - forward_avg = t_forward / steps - backward_avg = t_backward / steps - update_avg = t_update / steps - total_time = forward_avg + backward_avg + update_avg - logging.info( - "Avg time taken for training %s :: %f" % (model_tuple.name, total_time) - ) - logging.info("Avg inference time:: %f" % forward_avg) - logging.info( - "Training throughput :: %f images/sec" % (model_tuple.batch[0] / total_time) - ) - logging.info( - "Inference throughput :: %f images/sec" - % (model_tuple.batch[0] / forward_avg) - ) - logging.info("=" * 71) - - -def set_env_vars(): - """env variables to tune performance""" - os.environ["OMP_NUM_THREADS"] = str(int(mps.cpu_count() / 2)) - os.environ["KMP_BLOCKTIME"] = "0" - os.environ["KMP_AFFINITY"] = "granularity=fine,verbose,compact,1,0" - - -def print_config_details(): - """details about the platform, and the stack""" - logging.info("Platform details") - logging.info("=" * 71) - logging.info( - "cpu name :: %s" - % str( - subprocess.check_output( - "cat /proc/cpuinfo | grep 'model name' | head -n 1", shell=True - ) - ).split(":")[1][:-3] - ) - logging.info("operating system :: %s" % platform.platform()) - logging.info("processor count :: %d" % mps.cpu_count()) - logging.info("OMP_NUM_THREADS :: %s" % os.environ["OMP_NUM_THREADS"]) - logging.info("KMP BLOCKTIME :: %s" % os.environ["KMP_BLOCKTIME"]) - logging.info("KMP_AFFINITY :: %s" % os.environ["KMP_AFFINITY"]) - logging.info("=" * 71) - logging.info("Pytorch config") - logging.info("=" * 71) - logging.info("pytorch version :: %s" % torch.__version__) - logging.info("mkl available :: %s" % "Yes" if torch.has_lapack else "No") - logging.info("lapack available :: %s" % "Yes" if torch.has_mkl else "No") - mkldnn = os.path.isfile( - os.path.join(torch.get_file_path(), "torch", "lib", "libmkldnn.so") - ) - logging.info("mkldnn available :: %s" % "Yes" if mkldnn else "No") - logging.info("=" * 71) - - -def config_parser(): - """cli and logger definitions""" - parser = argparse.ArgumentParser() - parser.add_argument( - "-o", - "--log_to_file", - help="log output to file", - action="store_true", - default=False, - ) - parser.add_argument( - "-d", - "--dry_run", - help="Don't run the actual models", - action="store_true", - default=False, - ) - parser.add_argument( - "-m", "--models", help="input models as a comma sep list", type=str, nargs="*" - ) - args = parser.parse_args() - if args.log_to_file: - logging.basicConfig( - filename="benchmark.log", - filemode="a", - level=logging.DEBUG, - format="%(asctime)s - %(levelname)s - %(message)s", - ) - else: - logging.basicConfig( - level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(message)s" - ) - return args - - -if __name__ == "__main__": - args = config_parser() - if platform.system() != "Linux": - logging.info("Exiting... not a linux system") - exit(1) - set_env_vars() - print_config_details() - bmarks = BenchMarks() - models = args.models if args.models else ["alexnet", "resnet18"] - bmarks.main(models, dry_run=args.dry_run) diff --git a/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/pytorch_job_cnn_benchmarks.yaml b/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/pytorch_job_cnn_benchmarks.yaml deleted file mode 100644 index 15e9ece..0000000 --- a/stacks/dlrs/kubeflow/dlrs-pytorchjob/pytorch_cnn_benchmarks/pytorch_job_cnn_benchmarks.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: "kubeflow.org/v1beta2" -kind: "PyTorchJob" -metadata: - name: "pytorch-job-cnn-benchmark" -spec: - pytorchReplicaSpecs: - Master: - replicas: 1 - restartPolicy: Never - template: - spec: - containers: - - name: pytorch - image: your-project/stacks-pytorch-kf-mkl:0.4.0 - Worker: - replicas: 1 - restartPolicy: Never - template: - spec: - containers: - - name: pytorch - image: your-project/stacks-pytorch-kf-mkl:0.4.0 diff --git a/stacks/dlrs/kubeflow/dlrs-seldon/README.md b/stacks/dlrs/kubeflow/dlrs-seldon/README.md deleted file mode 100644 index 62140d4..0000000 --- a/stacks/dlrs/kubeflow/dlrs-seldon/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Seldon and OpenVINO model server using the Deep Learning Reference Stack - -[Seldon Core](https://docs.seldon.io/projects/seldon-core/en/latest/) is an open source platform for deploying machine learning models on a Kubernetes cluster. diff --git a/stacks/dlrs/kubeflow/dlrs-seldon/docker/Dockerfile_openvino_base b/stacks/dlrs/kubeflow/dlrs-seldon/docker/Dockerfile_openvino_base deleted file mode 100644 index b876bb3..0000000 --- a/stacks/dlrs/kubeflow/dlrs-seldon/docker/Dockerfile_openvino_base +++ /dev/null @@ -1,13 +0,0 @@ -FROM clearlinux/stacks-dlrs-mkl:v0.4.0 - -RUN pip install jaeger-client==3.13.0 seldon-core tornado>=5.0\ - && pip install --upgrade setuptools \ - && sed -i "s/max_workers=10/max_workers=1/g" /usr/lib/python3.7/site-packages/seldon_core/wrapper.py - -RUN git clone https://github.com/SeldonIO/seldon-core.git /opt/seldon-core \ - && mkdir -p /s2i/bin \ - && cp -a /opt/seldon-core/wrappers/s2i/python/s2i/bin/ /s2i/bin/ - -WORKDIR /microservice - -EXPOSE 5000 diff --git a/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/.helmignore b/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/Chart.yaml b/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/Chart.yaml deleted file mode 100644 index db76b41..0000000 --- a/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "v0.1" -description: Simple Seldon and OpenVINO Server -name: seldon-model-server -version: 0.1.0 diff --git a/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/templates/seldondeployment.yaml b/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/templates/seldondeployment.yaml deleted file mode 100644 index 9c8f847..0000000 --- a/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/templates/seldondeployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -apiVersion: machinelearning.seldon.io/v1alpha2 -kind: SeldonDeployment -metadata: - labels: - app: seldon-openvino-simple-server - name: "{{ .Release.Name }}" - namespace: "{{ .Release.Namespace }}" -spec: - name: "{{ .Release.Name }}" - predictors: - - componentSpecs: - - spec: - containers: - - image: "{{ .Values.tfserving_proxy.image }}" - name: tfserving-proxy - resources: - limits: - cpu: "{{ .Values.openvino.limits.cpu }}" - memory: "{{ .Values.openvino.limits.memory }}" - requests: - cpu: "{{ .Values.openvino.requests.cpu }}" - memory: "{{ .Values.openvino.requests.memory }}" - - name: openvino-model-server - image: "{{ .Values.openvino.image }}" - command: - - "/workspace/scripts/serve.sh" - args: - - ie_serving - - model - - "--model_path" - - "{{ .Values.openvino.model.path }}" - - "--model_name" - - "{{ .Values.openvino.model.name }}" - - "--port" - - "{{ .Values.openvino.port }}" - ports: - - name: grpc - containerPort: {{ .Values.openvino.port }} - protocol: TCP - env: - - name: LOG_LEVEL - value: DEBUG - resources: - limits: - cpu: "{{ .Values.openvino.limits.cpu }}" - memory: "{{ .Values.openvino.limits.memory }}" - requests: - cpu: "{{ .Values.openvino.requests.cpu }}" - memory: "{{ .Values.openvino.requests.memory }}" - terminationGracePeriodSeconds: 1 - hpaSpec: - minReplicas: 1 - maxReplicas: 3 - metrics: - - type: Resource - resource: - name: cpu - targetAverageUtilization: 50 - graph: - name: tfserving-proxy - endpoint: - type: GRPC - type: MODEL - children: [] - parameters: - - name: grpc_endpoint - type: STRING - value: localhost:{{ .Values.openvino.port }} - - name: model_name - type: STRING - value: "{{ .Values.openvino.model.name }}" - - name: model_output - type: STRING - value: "{{ .Values.openvino.model.output }}" - - name: model_input - type: STRING - value: "{{ .Values.openvino.model.input }}" - name: openvino - replicas: 1 diff --git a/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/values.yaml b/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/values.yaml deleted file mode 100644 index 3b155cf..0000000 --- a/stacks/dlrs/kubeflow/dlrs-seldon/helm/seldon-model-server/values.yaml +++ /dev/null @@ -1,14 +0,0 @@ -openvino: - model: - input: data - output: prob - port: 8001 - claim_name: model-store-pvc - limits: - cpu: 4 - memory: 4Gi - requests: - cpu: 500m - memory: 1Gi -tfserving_proxy: - image: seldonio/tfserving-proxy:0.2 diff --git a/stacks/dlrs/kubeflow/dlrs-seldon/storage/model-store-pvc.yaml b/stacks/dlrs/kubeflow/dlrs-seldon/storage/model-store-pvc.yaml deleted file mode 100644 index cb4d76b..0000000 --- a/stacks/dlrs/kubeflow/dlrs-seldon/storage/model-store-pvc.yaml +++ /dev/null @@ -1,11 +0,0 @@ -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: model-store-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi - storageClassName: manual diff --git a/stacks/dlrs/kubeflow/dlrs-seldon/storage/pv-pod.yaml b/stacks/dlrs/kubeflow/dlrs-seldon/storage/pv-pod.yaml deleted file mode 100644 index b7c3e99..0000000 --- a/stacks/dlrs/kubeflow/dlrs-seldon/storage/pv-pod.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: pv-pod -spec: - volumes: - - name: pv-storage - persistentVolumeClaim: - claimName: model-store-pvc - containers: - - name: pv-container - image: nginx - ports: - - containerPort: 80 - name: "http-server" - volumeMounts: - - mountPath: "/opt/ml" - name: pv-storage diff --git a/stacks/dlrs/kubeflow/dlrs-seldon/storage/pv-volume.yaml b/stacks/dlrs/kubeflow/dlrs-seldon/storage/pv-volume.yaml deleted file mode 100644 index 5a1df1d..0000000 --- a/stacks/dlrs/kubeflow/dlrs-seldon/storage/pv-volume.yaml +++ /dev/null @@ -1,14 +0,0 @@ -kind: PersistentVolume -apiVersion: v1 -metadata: - name: pv-volume -spec: - capacity: - storage: 1Gi - hostPath: - path: "/opt/ml" - type: '' - accessModes: - - ReadWriteOnce - persistentVolumeReclaimPolicy: Retain - storageClassName: manual diff --git a/stacks/dlrs/kubeflow/dlrs-tfjob/README.md b/stacks/dlrs/kubeflow/dlrs-tfjob/README.md deleted file mode 100644 index 0951e73..0000000 --- a/stacks/dlrs/kubeflow/dlrs-tfjob/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# TensorFlow Training (TFJob) with Kubeflow and DLRS - -A [TFJob](https://www.kubeflow.org/docs/components/tftraining) is Kubeflow's custom resource used to run TensorFlow training jobs on Kubernetes. - -## Submitting TFJobs - -In this folder you will find TFJob examples that use the Deep Learning Reference Stack as base image for creating the container(s) that will run training workloads in your Kubernetes cluster. -Select one form the list below: - -* [Training Tensorflow CNN Benchmarks with DLRS + Intel® MKL-DNN and AVX512-DL Boost](https://github.com/clearlinux/dockerfiles/tree/master/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks) - -For further information, please refer to: -* [Distributed TensorFlow](https://www.tensorflow.org/deploy/distributed). -* [TFJobs](https://www.kubeflow.org/docs/components/tftraining/) diff --git a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/Dockerfile b/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/Dockerfile deleted file mode 100644 index 2eacf32..0000000 --- a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -# Docker image for running examples in Tensorflow models. -FROM clearlinux/stacks-dlrs-mkl:1390 - -RUN mkdir -p /opt -RUN git clone https://github.com/tensorflow/benchmarks.git /opt/tf-benchmarks - -COPY launcher.py /opt -RUN chmod u+x /opt/* -ENTRYPOINT ["/opt/launcher.py"] diff --git a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/README.md b/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/README.md deleted file mode 100644 index 9329c7c..0000000 --- a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Training Tensorflow CNN Benchmarks with DLRS + Intel® MKL-DNN and AVX512-DL Boost - -This directory contains code to train convolutional neural networks using [tf_cnn_benchmarks](https://github.com/tensorflow/benchmarks/tree/master/scripts/tf_cnn_benchmarks). - -> Source: [Training TF CNN models](https://github.com/kubeflow/kubeflow/tree/v0.5-branch/tf-controller-examples/tf-cnn) - -## Build Image - -The TFJob consumes a custom DLRS image for deployment. The default image name and tag is project-name/stacks-dlrs-kf-mkl; you should change the image name to match your project and make the proper changes in tf_job_cnn_benchmarks.yaml. - -```bash -docker build -f Dockerfile -t project-name/stacks-dlrs-kf-mkl:0.4.0 . -``` diff --git a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/launcher.py b/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/launcher.py deleted file mode 100644 index 8f72ee9..0000000 --- a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/launcher.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# Copyright 2017 The Kubeflow Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -""" -A launcher suitable for invoking tf_cnn_benchmarks using TfJob. - -All the launcher does is turn TF_CONFIG environment variable into extra -arguments to append to the command line. -""" -import json -import logging -import os -import subprocess -import sys -import time - - -def run_and_stream(cmd): - logging.info("Running %s", " ".join(cmd)) - process = subprocess.Popen( - cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - - while process.poll() is None: - process.stdout.flush() - if process.stderr: - process.stderr.flush() - sys.stderr.flush() - sys.stdout.flush() - for line in iter(process.stdout.readline, b''): - process.stdout.flush() - logging.info(line.strip()) - - sys.stderr.flush() - sys.stdout.flush() - process.stdout.flush() - if process.stderr: - process.stderr.flush() - for line in iter(process.stdout.readline, b''): - logging.info(line.strip()) - - if process.returncode != 0: - raise ValueError("cmd: {0} exited with code {1}".format( - " ".join(cmd), process.returncode)) - - -if __name__ == "__main__": - logging.getLogger().setLevel(logging.INFO) - logging.basicConfig( - level=logging.INFO, - format=('%(levelname)s|%(asctime)s' - '|%(pathname)s|%(lineno)d| %(message)s'), - datefmt='%Y-%m-%dT%H:%M:%S', - ) - logging.info("Launcher started.") - tf_config = os.environ.get('TF_CONFIG', '{}') - tf_config_json = json.loads(tf_config) - cluster = tf_config_json.get('cluster', {}) - job_name = tf_config_json.get('task', {}).get('type', "") - task_index = tf_config_json.get('task', {}).get('index', "") - - command = sys.argv[1:] - ps_hosts = ",".join(cluster.get("ps", [])) - worker_hosts = ",".join(cluster.get("worker", [])) - command.append("--job_name=" + job_name) - command.append("--ps_hosts=" + ps_hosts) - command.append("--worker_hosts=" + worker_hosts) - command.append("--task_index={0}".format(task_index)) - - logging.info("Command to run: %s", " ".join(command)) - with open("/opt/run_benchmarks.sh", "w") as hf: - hf.write("#!/bin/bash\n") - hf.write(" ".join(command)) - hf.write("\n") - - run_and_stream(command) - logging.info("Finished: %s", " ".join(command)) - # We don't want to terminate because TfJob will just restart the job. - while True: - logging.info("Command ran successfully sleep for ever.") - time.sleep(600) diff --git a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/sources b/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/sources deleted file mode 100644 index 913fc7b..0000000 --- a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/sources +++ /dev/null @@ -1,10 +0,0 @@ -# Dockerfile -# https://github.com/kubeflow/kubeflow/blob/v0.3.2/tf-controller-examples/tf-cnn/Dockerfile.cpu -# Changes: -# Change upstream image from google to dlaas -# Remove apt commands - -# launcher.py -# https://github.com/kubeflow/kubeflow/blob/v0.3.2/tf-controller-examples/tf-cnn/launcher.py -# Changes: -# Remove last 3 lines which will keep the pod running forever diff --git a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/tf_job_cnn_benchmarks.yaml b/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/tf_job_cnn_benchmarks.yaml deleted file mode 100644 index 4b0e35e..0000000 --- a/stacks/dlrs/kubeflow/dlrs-tfjob/tf_cnn_benchmarks/tf_job_cnn_benchmarks.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: kubeflow.org/v1beta2 -kind: TFJob -metadata: - generateName: tfjob - namespace: kubeflow -spec: - tfReplicaSpecs: - PS: - replicas: 1 - restartPolicy: Never - template: - spec: - containers: - - name: tensorflow - image: /stacks-dlrs-kf-mkl: - workingDir: /opt/tf-benchmarks/scripts/tf_cnn_benchmarks - command: - - python - - tf_cnn_benchmarks.py - - --batch_size=32 - - --model=alexnet - - --variable_update=parameter_server - - --local_parameter_device=cpu - - --init_learning_rate=0.0001 - - --tf_random_seed=8286 - - --device=cpu - - --data_format=NHWC - Worker: - replicas: 3 - restartPolicy: Never - template: - spec: - containers: - - name: tensorflow - image: /stacks-dlrs-kf-mkl: - workingDir: /opt/tf-benchmarks/scripts/tf_cnn_benchmarks - command: - - python - - tf_cnn_benchmarks.py - - --batch_size=32 - - --model=alexnet - - --variable_update=parameter_server - - --local_parameter_device=cpu - - --init_learning_rate=0.0001 - - --tf_random_seed=8286 - - --device=cpu - - --data_format=NHWC - Master: - replicas: 1 - restartPolicy: Never - template: - spec: - containers: - - name: tensorflow - image: /stacks-dlrs-kf-mkl: - workingDir: /opt/tf-benchmarks/scripts/tf_cnn_benchmarks - command: - - python - - tf_cnn_benchmarks.py - - --batch_size=32 - - --model=alexnet - - --variable_update=parameter_server - - --local_parameter_device=cpu - - --init_learning_rate=0.0001 - - --tf_random_seed=8286 - - --device=cpu - - --data_format=NHWC diff --git a/stacks/dlrs/mkl/Dockerfile b/stacks/dlrs/mkl/Dockerfile deleted file mode 100644 index 6f58504..0000000 --- a/stacks/dlrs/mkl/Dockerfile +++ /dev/null @@ -1,98 +0,0 @@ -#--------------------------------------------------------------------- -# Base instance to build MKL based Tensorflow on Clear Linux -#--------------------------------------------------------------------- -ARG clear_ver -FROM stacks-clearlinux:$clear_ver as base -LABEL maintainer=otc-swstacks@intel.com - -# FIXME: Until Moby finds a way for saving ARGs in multi-stage builds (see https://github.com/moby/moby/issues/34129) -# we have to re-declare clear_ver -ARG clear_ver -ARG swupd_args=$clear_ver - -# update os and add required bundles -RUN swupd update -m $swupd_args \ - && swupd bundle-add git curl wget \ - java-basic sysadmin-basic package-utils devpkg-zlib - -# fix for stdlib not found issue -RUN ln -sf /usr/lib64/libstdc++.so /usr/lib64/libstdc++.so.6 - -COPY ./scripts/ /scripts -# do not change the order of the devpkg-opencv bundle install -# as it interferes with TensorFlow build -RUN ./scripts/install_bazel.sh \ - && ./scripts/install_tensorflow.sh -RUN cd /usr/lib64/ && ln -sf libzstd.so.1.4.1 libzstd.so.1 -RUN swupd clean \ - && swupd bundle-add devpkg-opencv devpkg-llvm \ - && ./scripts/build_openvino_ie.sh - -#--------------------------------------------------------------------- -# Tensorflow with MKL-DNN on Clear Linux -#--------------------------------------------------------------------- -ARG clear_ver -FROM stacks-clearlinux:$clear_ver -LABEL maintainer=otc-swstacks@intel.com - -# FIXME: Until Moby finds a way for saving ARGs in multi-stage builds (see https://github.com/moby/moby/issues/34129) -# we have to re-declare clear_ver -ARG clear_ver -ARG swupd_args=$clear_ver -ARG HOROVOD_VERSION=0.16.4 -ARG NUMACTL_VERSION=2.0.12 -ARG MODEL_SERVER_TAG=v2019.1.1 - -# update os and add required bundles -RUN swupd update -m $swupd_args \ - && swupd bundle-add devpkg-openmpi devpkg-libX11 git openssh-server c-basic nodejs-basic curl python3-basic devpkg-gperftools \ - && curl -fSsL -O https://github.com/numactl/numactl/releases/download/v${NUMACTL_VERSION}/numactl-${NUMACTL_VERSION}.tar.gz \ - && tar xf numactl-${NUMACTL_VERSION}.tar.gz \ - && cd numactl-${NUMACTL_VERSION} \ - && ./configure \ - && make \ - && make install \ - && rm -rf /numactl-${NUMACTL_VERSION}* \ - && rm -rf /var/lib/swupd/* \ - && ln -sf /usr/lib64/libstdc++.so /usr/lib64/libstdc++.so.6 \ - && ln -sf /usr/lib64/libzstd.so.1.4.* /usr/lib64/libzstd.so.1 \ - && ln -s /usr/lib64/libtcmalloc.so /usr/lib/libtcmalloc.so - -# install tensorflow, ntlk, jupyterhub, opencv and horovod -COPY --from=base /tmp/tf/*.whl /tmp/. -RUN pip --no-cache-dir install /tmp/tensorflow*.whl \ - nltk jupyter jupyterlab jupyterhub opencv-python \ - horovod==${HOROVOD_VERSION} \ - && npm install -g configurable-http-proxy \ - && pip --no-cache-dir install common \ - && pip --no-cache-dir install notebook protobuf \ - && pip --no-cache-dir install numpy tensorflow-serving-api google-cloud-storage boto3 jsonschema falcon cheroot \ - && pip --no-cache-dir install grpcio defusedxml==0.5.0 grpcio-tools test-generator==0.1.1 \ - && npm cache clean --force \ - && rm -rf /tmp/* \ - && find /usr/lib/ -follow -type f -name '*.pyc' -delete \ - && find /usr/lib/ -follow -type f -name '*.js.map' -delete - -# install openvino inference engine -COPY --from=base /dldt/inference-engine/bin/intel64/Release/lib/*.so /usr/local/lib/ -COPY --from=base /dldt/inference-engine/ie_bridges/python/bin/intel64/Release/python_api/python3.7/openvino/ /usr/local/lib/openvino/ - -# init -RUN echo "export LD_LIBRARY_PATH=/usr/local/lib" >> /.bashrc \ - && echo "export PYTHONPATH=/usr/local/lib" >> /.bashrc -# init ie serving -WORKDIR /ie_serving_py -RUN git clone https://github.com/IntelAI/OpenVINO-model-server.git model_server \ - && cd model_server && git checkout ${MODEL_SERVER_TAG} && cd .. \ - && cp ./model_server/setup.py /ie_serving_py \ - && echo "OpenVINO Model Server version: ${MODEL_SERVER_TAG}" > /ie_serving_py/version \ - && echo "Git commit: `cd ./model_server; git rev-parse HEAD; cd ..`" >> /ie_serving_py/version \ - && echo "OpenVINO version: ${MODEL_SERVER_TAG} src" >> /ie_serving_py/version \ - && echo "# OpenVINO built with: https://github.com/opencv/dldt.git" >> /ie_serving_py/version \ - && cp -r ./model_server/ie_serving /ie_serving_py/ie_serving \ - && pip --no-cache-dir install . \ - && rm -rf model_server -WORKDIR /workspace -COPY ./scripts/*.sh /workspace/scripts/ -COPY ./scripts/*.md /workspace/scripts/ -RUN chmod -R a+w /workspace diff --git a/stacks/dlrs/mkl/README.md b/stacks/dlrs/mkl/README.md deleted file mode 100644 index 05d9cfd..0000000 --- a/stacks/dlrs/mkl/README.md +++ /dev/null @@ -1,22 +0,0 @@ -## Deep Learning Reference Stack with TensorFlow and Intel® MKL-DNN - -[![](https://images.microbadger.com/badges/image/clearlinux/stacks-dlrs-mkl.svg)](https://microbadger.com/images/clearlinux/stacks-dlrs-mkl "Get your own image badge on microbadger.com") - -### Building Locally - -Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg - ->NOTE: This command is for locally building this image alone. - -``` -docker build --no-cache --build-arg clear_ver="30650" -t clearlinux/stacks-tensorflow-mkl . -``` - -### Build ARGs - -* `clear_ver` specifies the latest validated Clearlinux version for this DLRS Dockerfile. ->NOTE: Changing this version may result in errors, if you want to upgrade the OS version, you should use `swupd_args` instead. - -* `swupd_args` specifies [swupd update](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags passed to the update during build. - ->NOTE: An empty `swupd_args` will default to 30650. Consider this when building as an OS upgrade won't be performed. If you'd like to upgrade the OS version, you can either do it manually inside a running container or add `swupd_args=""` to the build command. The latest validated version is 30650, using a different one might result in unexpected errors. diff --git a/stacks/dlrs/mkl/licenses/README.md b/stacks/dlrs/mkl/licenses/README.md deleted file mode 100644 index d0ba966..0000000 --- a/stacks/dlrs/mkl/licenses/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Additional details on licenses - -As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/stacks/dlrs/mkl/licenses/clear_LICENSE b/stacks/dlrs/mkl/licenses/clear_LICENSE deleted file mode 100644 index d80df35..0000000 --- a/stacks/dlrs/mkl/licenses/clear_LICENSE +++ /dev/null @@ -1,161 +0,0 @@ - -List of licenses used in Clear Linux OS. - -This list is automatically generated. If you spot a mistake or -omission, please mention this on dev@lists.clearlinux.org. - -To read the full license text for these licenses, please visit -http://spdx.org/licenses/. A few licenses in this list are not -declared on the http://spdx.org/licenses/ website, they are listed -at the bottom of this list. - -AFL-2.0 -AFL-2.1 -AGPL-3.0 -AML -ANTLR-PD -APSL-2.0 -Apache-1.1 -Apache-2.0 -Artistic-1.0 -Artistic-1.0-Perl -Artistic-2.0 -BSD-2-Clause -BSD-2-Clause-FreeBSD -BSD-2-Clause-NetBSD -BSD-3-Clause -BSD-3-Clause-Attribution -BSD-3-Clause-Clear -BSD-3-Clause-LBNL -BSD-4-Clause -BSD-4-Clause-UC -BSL-1.0 -CC-BY-2.0 -CC-BY-3.0 -CC-BY-4.0 -CC-BY-ND-4.0 -CC-BY-SA-2.0 -CC-BY-SA-3.0 -CC-BY-SA-4.0 -CC0-1.0 -CDDL-1.0 -CDDL-1.1 -CECILL-1.1 -CECILL-B -CPL-1.0 -ClArtistic -Distributable -EPL-1.0 -Eurosym -FSFAP -FSFULLR -FTL -GFDL-1.1 -GFDL-1.2 -GFDL-1.3 -GFDL-1.3+ -GL2PS -GPL-1.0 -GPL-1.0+ -GPL-2.0 -GPL-2.0+ -GPL-2.0-only -GPL-2.0-or-later -GPL-3.0 -GPL-3.0+ -GPL-3.0-only -HPND -ICU -IJG -IPA -ISC -ImageMagick -Imlib2 -Intel -JSON -JasPer-2.0 -LAL-1.2 -LGPL-2.0 -LGPL-2.0+ -LGPL-2.1 -LGPL-2.1+ -LGPL-2.1-only -LGPL-3.0 -LGPL-3.0+ -LGPL-3.0-only -LPL-1.0 -LPPL-1.0 -LPPL-1.2 -LPPL-1.3a -LPPL-1.3c -Libpng -MIT -MIT-Opengroup -MIT-enna -MIT-feh -MPL-1.1 -MPL-2.0 -MPL-2.0-no-copyleft-exception -MS-PL -MTLL -MakeIndex -NCSA -NTP -NetCDF -Nunit -OFL-1.0 -OFL-1.1 -OLDAP-2.0.1 -OLDAP-2.8 -OML -OSL-2.0 -OpenSSL -PHP-3.0 -PHP-3.01 -Plexus -PostgreSQL -Public-Domain -Python-2.0 -QPL-1.0 -Qhull -RSA-MD -Rdisc -Ruby -SAX-PD -SGI-B-1.0 -SGI-B-1.1 -SGI-B-2.0 -SISSL -SPL-1.0 -Saxpath -Sleepycat -TCL -TMate -Unicode-TOU -Unlicense -Vim -W3C -W3C-19980720 -WTFPL -Wsuipa -X11 -ZPL-2.0 -ZPL-2.1 -Zend-2.0 -Zlib -bzip2-1.0.5 -bzip2-1.0.6 -gnuplot -libtiff -psutils -zlib-acknowledgement - -The following licenses are not standard spdx identifiers: -- Copyright -- Distributable -- Public-Domain - -These are used for projects that have explicitly granted redistribution -of the project source code, but don't have a typical OSI approved -license identifier. - diff --git a/stacks/dlrs/mkl/licenses/horovod_LICENSE b/stacks/dlrs/mkl/licenses/horovod_LICENSE deleted file mode 100644 index 91c27eb..0000000 --- a/stacks/dlrs/mkl/licenses/horovod_LICENSE +++ /dev/null @@ -1,274 +0,0 @@ - Horovod - Copyright 2018 Uber Technologies, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Horovod includes: - - FlatBuffers - Copyright (c) 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - baidu-research/tensorflow-allreduce - Copyright (c) 2015, The TensorFlow Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - NVIDIA/cutlass - Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the NVIDIA CORPORATION nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/stacks/dlrs/mkl/licenses/miniconda_LICENSE b/stacks/dlrs/mkl/licenses/miniconda_LICENSE deleted file mode 100644 index 11b5cde..0000000 --- a/stacks/dlrs/mkl/licenses/miniconda_LICENSE +++ /dev/null @@ -1,44 +0,0 @@ -=================================== -Miniconda End User License Agreement -=================================== - -Copyright 2015, Anaconda, Inc. - -All rights reserved under the 3-clause BSD License: - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Anaconda, Inc. ("Anaconda, Inc.") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANACONDA, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Notice of Third Party Software Licenses -======================================= - -Miniconda contains open source software packages from third parties. These are available on an "as is" basis and subject to their individual license agreements. These licenses are available in Anaconda Distribution or at http://docs.anaconda.com/anaconda/pkg-docs. Any binary packages of these third party tools you obtain via Anaconda Distribution are subject to their individual licenses as well as the Anaconda license. Anaconda, Inc. reserves the right to change which third party tools are provided in Miniconda. - -Cryptography Notice -=================== - -This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See the Wassenaar Arrangement http://www.wassenaar.org/ for more information. - -Anaconda, Inc. has self-classified this software as Export Commodity Control Number (ECCN) 5D992b, which includes mass market information security software using or performing cryptographic functions with asymmetric algorithms. No license is required for export of this software to non-embargoed countries. In addition, the Intel(TM) Math Kernel Library contained in Anaconda, Inc.'s software is classified by Intel(TM) as ECCN 5D992b with no license required for export to non-embargoed countries. - -The following packages are included in this distribution that relate to cryptography: - -openssl - The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols as well as a full-strength general purpose cryptography library. - -pycrypto - A collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal, etc.). - -pyopenssl - A thin Python wrapper around (a subset of) the OpenSSL library. - -kerberos (krb5, non-Windows platforms) - A network authentication protocol designed to provide strong authentication for client/server applications by using secret-key cryptography. - -cryptography - A Python library which exposes cryptographic recipes and primitives. \ No newline at end of file diff --git a/stacks/dlrs/mkl/licenses/mkl_LICENSE b/stacks/dlrs/mkl/licenses/mkl_LICENSE deleted file mode 100644 index 817590f..0000000 --- a/stacks/dlrs/mkl/licenses/mkl_LICENSE +++ /dev/null @@ -1,41 +0,0 @@ -Copyright (c) 2018 Intel Corporation. - -Use and Redistribution. You may use and redistribute the software (the “Software”), without modification, provided the following conditions are met: - -* Redistributions must reproduce the above copyright notice and the following terms of use in the Software and in the documentation and/or other materials provided with the distribution. - -* Neither the name of Intel nor the names of its suppliers may be used to endorse or promote products derived from this Software without specific prior written permission. - -* No reverse engineering, decompilation, or disassembly of this Software is permitted. - -Limited patent license. Intel grants you a world-wide, royalty-free, non-exclusive license under patents it now or hereafter owns or controls to make, have made, use, import, offer to sell -and sell (“Utilize”) this Software, but solely to the extent that any such patent is necessary to Utilize the Software alone. The patent license shall not apply to any combinations which include -this software. No hardware per se is licensed hereunder. - -Third party and other Intel programs. “Third Party Programs” are the files listed in the “third-party-programs.txt” text file that is included with the Software and may include Intel programs under -separate license terms. Third Party Programs, even if included with the distribution of the Materials, are governed by separate license terms and those license terms solely govern your use of those programs. - -DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND -NON-INFRINGEMENT ARE DISCLAIMED. THIS SOFTWARE IS NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS WHERE FAILURE OF THE SOFTWARE MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE THAT YOU ARE FULLY -RESPONSIBLE FOR ANY CLAIMS, COSTS, DAMAGES, EXPENSES, AND ATTORNEYS’ FEES ARISING OUT OF ANY SUCH USE, EVEN IF ANY CLAIM ALLEGES THAT INTEL WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. - -LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. YOU AGREE TO INDEMNIFY AND HOLD INTEL HARMLESS AGAINST ANY CLAIMS AND EXPENSES RESULTING FROM -YOUR USE OR UNAUTHORIZED USE OF THE SOFTWARE. - -No support. Intel may make changes to the Software, at any time without notice, and is not obligated to support, update or provide training for the Software. - -Termination. Intel may terminate your right to use the Software in the event of your breach of this Agreement and you fail to cure the breach within a reasonable period of time. - -Feedback. Should you provide Intel with comments, modifications, corrections, enhancements or other input (“Feedback”) related to the Software Intel will be free to use, disclose, reproduce, -license or otherwise distribute or exploit the Feedback in its sole discretion without any obligations or restrictions of any kind, including without limitation, intellectual property rights or -licensing obligations. - -Compliance with laws. You agree to comply with all relevant laws and regulations governing your use, transfer, import or export (or prohibition thereof) of the Software. - -Governing law. All disputes will be governed by the laws of the United States of America and the State of Delaware without reference to conflict of law principles and subject to the exclusive -jurisdiction of the state or federal courts sitting in the State of Delaware, and each party agrees that it submits to the personal jurisdiction and venue of those courts and waives any objections. -The United Nations Convention on Contracts for the International Sale of Goods (1980) is specifically excluded and will not apply to the Software. - -*Other names and brands may be claimed as the property of others. \ No newline at end of file diff --git a/stacks/dlrs/mkl/scripts/build_openvino_ie.sh b/stacks/dlrs/mkl/scripts/build_openvino_ie.sh deleted file mode 100755 index 38300a4..0000000 --- a/stacks/dlrs/mkl/scripts/build_openvino_ie.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -set -e -set -u -set -o pipefail - -export CFLAGS="-O3 " -export CXXFLAGS="-O3 " -export FCFLAGS="$CFLAGS " -export FFLAGS="$CFLAGS " -export CFLAGS="$CFLAGS -march=skylake-avx512 -m64 -pipe" -export CXXFLAGS="$CXXFLAGS -march=skylake-avx512 -m64 -pipe" -export GCC_IGNORE_WERROR=1 -export GIT_HASH=0ef928 # 2019_R1.0.1 -# setup mkl -export MKL_VERSION=mklml_lnx_2019.0.5.20190502 -export MKLDNN=v0.19 -export N_JOBS=$(grep -c ^processor /proc/cpuinfo) - -echo "=================get dldt=================================" -if [ ! -d ./dldt/ ]; then - git clone --recursive -j"$N_JOBS" https://github.com/opencv/dldt.git &&\ - cd dldt && git checkout -b v2019_R1.1 $GIT_HASH && cd .. -fi -echo "=================config and build inference engine==================" -cd ./dldt/ -CMAKE_ARGS="-DENABLE_MKL_DNN=ON -DTHREADING=OMP -DENABLE_GNA=OFF -DENABLE_CLDNN=OFF -DENABLE_MYRIAD=OFF -DENABLE_VPU=OFF" -mkdir -p ./inference-engine/build &&\ -cd ./inference-engine/build -IE_BUILD_DIR=$(pwd) -cmake $CMAKE_ARGS .. -make -j"$N_JOBS" -echo "=================config and build IE bridges=========================" -CMAKE_ARGS="-DInferenceEngine_DIR=$IE_BUILD_DIR --DPYTHON_EXECUTABLE=$(command -v python) --DPYTHON_LIBRARY=/usr/lib64/libpython3.7m.so --DPYTHON_INCLUDE_DIR=/usr/include/python3.7m" -cd "$IE_BUILD_DIR"/../ie_bridges/python &&\ -mkdir -p build &&\ -cd build -cmake $CMAKE_ARGS .. -make -j"$N_JOBS" -echo "====================================================================" -echo "Inference Engine build directory is: $IE_BUILD_DIR" -echo "IE bridges build directory is: $(pwd)" -echo "====================================================================" diff --git a/stacks/dlrs/mkl/scripts/install_bazel.sh b/stacks/dlrs/mkl/scripts/install_bazel.sh deleted file mode 100755 index 7afe9d6..0000000 --- a/stacks/dlrs/mkl/scripts/install_bazel.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -set -e -set -u -set -o pipefail - -export BAZEL_VERSION=0.25.2 -# download and install bazel -mkdir /bazel && cd /bazel -curl -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-dist.zip -unzip bazel-$BAZEL_VERSION-dist.zip - -env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh -cp output/bazel /usr/bin/ - diff --git a/stacks/dlrs/mkl/scripts/install_tensorflow.sh b/stacks/dlrs/mkl/scripts/install_tensorflow.sh deleted file mode 100755 index f8a74f9..0000000 --- a/stacks/dlrs/mkl/scripts/install_tensorflow.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -set -e -set -u -set -o pipefail - -export ARCH=skylake-avx512 -export TUNE=cascadelake -export OPTM=3 -export TF_BRANCH=r1.14 -export TF_TAG=v1.14.0 -export PYTHON_BIN_PATH=/usr/bin/python -export PROJECT=tensorflow -export USE_DEFAULT_PYTHON_LIB_PATH=1 -export CC_OPT_FLAGS="-march=${ARCH} -mtune=native" -export TF_NEED_JEMALLOC=1 -export TF_NEED_KAFKA=0 -export TF_NEED_OPENCL_SYCL=0 -export TF_NEED_GCP=0 -export TF_NEED_HDFS=0 -export TF_NEED_S3=0 -export TF_ENABLE_XLA=1 -export TF_NEED_GDR=0 -export TF_NEED_VERBS=0 -export TF_NEED_OPENCL=0 -export TF_NEED_MPI=0 -export TF_NEED_TENSORRT=0 -export TF_SET_ANDROID_WORKSPACE=0 -export TF_DOWNLOAD_CLANG=0 -export TF_NEED_CUDA=0 -export TF_BUILD_MAVX=MAVX512 -export HTTP_PROXY=$(echo "$http_proxy" | sed -e 's/\/$//') -export HTTPS_PROXY=$(echo "$https_proxy" | sed -e 's/\/$//') - -run() { - echo "==============================================================" - printf "$(date) -- %s" - printf "%s\n" "$@" - echo "==============================================================" -} - -python_pkgs(){ -# install dependencies for tensorflow build - pip install pip six numpy wheel setuptools mock future>0.17.1 - pip install keras_applications==1.0.6 --no-deps - pip install keras_preprocessing==1.0.5 --no-deps -} - -get_project() { - git clone https://github.com/${PROJECT}/${PROJECT}.git - cd tensorflow && git checkout -b ${TF_BRANCH} ${TF_TAG} -} - -build () { - # configure tensorflow make scripts - ./configure - - # build TF - bazel --output_base=/tmp/bazel build \ - --repository_cache=/tmp/cache \ - --config=opt --config=mkl --copt=-mfma \ - --copt=-O${OPTM} --copt=-Wa,-mfence-as-lock-add=yes \ - --copt=-march=${ARCH} --copt=-mtune=native \ - //tensorflow/tools/pip_package:build_pip_package - - # generate pip package - bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tf/ -} - -begin="$(date +%s)" -run "get ${PROJECT}" && get_project -run "install python deps" && python_pkgs -run "config, build ${PROJECT}" && build -finish="$(date +%s)" -runtime=$(((finish-begin)/60)) -run "Done in : $runtime minute(s)" diff --git a/stacks/dlrs/mkl/scripts/serve.sh b/stacks/dlrs/mkl/scripts/serve.sh deleted file mode 100755 index 6896a20..0000000 --- a/stacks/dlrs/mkl/scripts/serve.sh +++ /dev/null @@ -1,3 +0,0 @@ -# start the model server -cd /ie_serving_py -exec "$@" diff --git a/stacks/dlrs/oss/Dockerfile b/stacks/dlrs/oss/Dockerfile deleted file mode 100644 index 4510295..0000000 --- a/stacks/dlrs/oss/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -ARG clear_ver -FROM stacks-clearlinux:$clear_ver - -# FIXME: Until Moby finds a way for saving ARGs in multi-stage builds (see https://github.com/moby/moby/issues/34129) -# we have to re-declare clear_ver -ARG clear_ver -ARG swupd_args=$clear_ver -LABEL maintainer=otc-swstacks@intel.com - -RUN swupd update -m $swupd_args && swupd bundle-add curl sysadmin-basic devpkg-gperftools \ - git machine-learning-tensorflow \ - && ln -s /usr/lib64/libtcmalloc.so /usr/lib/libtcmalloc.so - -# install additional python packages for ipython and jupyter notebook -RUN pip --no-cache-dir install ipython ipykernel matplotlib jupyter && \ - python -m ipykernel.kernelspec - -CMD 'bash' diff --git a/stacks/dlrs/oss/README.md b/stacks/dlrs/oss/README.md deleted file mode 100644 index f876482..0000000 --- a/stacks/dlrs/oss/README.md +++ /dev/null @@ -1,22 +0,0 @@ -## Deep Learning Reference Stack with Pytorch and Intel® MKL-DNN - -[![](https://images.microbadger.com/badges/image/clearlinux/stacks-pytorch-mkl.svg)](https://microbadger.com/images/clearlinux/stacks-pytorch-mkl "Get your own image badge on microbadger.com") - -### Building Locally - -Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg - ->NOTE: This command is for locally building this image alone. - -``` -docker build --no-cache --build-arg clear_ver="30650" -t clearlinux/stacks-tensorflow-oss . -``` - -### Build ARGs - -* `clear_ver` specifies the latest validated Clearlinux version for this DLRS Dockerfile. ->NOTE: Changing this version may result in errors, if you want to upgrade the OS version, you should use `swupd_args` instead. - -* `swupd_args` specifies [swupd update](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags passed to the update during build. - ->NOTE: An empty `swupd_args` will default to 30650. Consider this when building as an OS upgrade won't be performed. If you'd like to upgrade the OS version, you can either do it manually inside a running container or add `swupd_args=""` to the build command. The latest validated version is 30650, using a different one might result in unexpected errors. diff --git a/stacks/dlrs/oss/licenses/README.md b/stacks/dlrs/oss/licenses/README.md deleted file mode 100644 index d0ba966..0000000 --- a/stacks/dlrs/oss/licenses/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Additional details on licenses - -As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/stacks/dlrs/oss/licenses/clear_LICENSE b/stacks/dlrs/oss/licenses/clear_LICENSE deleted file mode 100644 index d80df35..0000000 --- a/stacks/dlrs/oss/licenses/clear_LICENSE +++ /dev/null @@ -1,161 +0,0 @@ - -List of licenses used in Clear Linux OS. - -This list is automatically generated. If you spot a mistake or -omission, please mention this on dev@lists.clearlinux.org. - -To read the full license text for these licenses, please visit -http://spdx.org/licenses/. A few licenses in this list are not -declared on the http://spdx.org/licenses/ website, they are listed -at the bottom of this list. - -AFL-2.0 -AFL-2.1 -AGPL-3.0 -AML -ANTLR-PD -APSL-2.0 -Apache-1.1 -Apache-2.0 -Artistic-1.0 -Artistic-1.0-Perl -Artistic-2.0 -BSD-2-Clause -BSD-2-Clause-FreeBSD -BSD-2-Clause-NetBSD -BSD-3-Clause -BSD-3-Clause-Attribution -BSD-3-Clause-Clear -BSD-3-Clause-LBNL -BSD-4-Clause -BSD-4-Clause-UC -BSL-1.0 -CC-BY-2.0 -CC-BY-3.0 -CC-BY-4.0 -CC-BY-ND-4.0 -CC-BY-SA-2.0 -CC-BY-SA-3.0 -CC-BY-SA-4.0 -CC0-1.0 -CDDL-1.0 -CDDL-1.1 -CECILL-1.1 -CECILL-B -CPL-1.0 -ClArtistic -Distributable -EPL-1.0 -Eurosym -FSFAP -FSFULLR -FTL -GFDL-1.1 -GFDL-1.2 -GFDL-1.3 -GFDL-1.3+ -GL2PS -GPL-1.0 -GPL-1.0+ -GPL-2.0 -GPL-2.0+ -GPL-2.0-only -GPL-2.0-or-later -GPL-3.0 -GPL-3.0+ -GPL-3.0-only -HPND -ICU -IJG -IPA -ISC -ImageMagick -Imlib2 -Intel -JSON -JasPer-2.0 -LAL-1.2 -LGPL-2.0 -LGPL-2.0+ -LGPL-2.1 -LGPL-2.1+ -LGPL-2.1-only -LGPL-3.0 -LGPL-3.0+ -LGPL-3.0-only -LPL-1.0 -LPPL-1.0 -LPPL-1.2 -LPPL-1.3a -LPPL-1.3c -Libpng -MIT -MIT-Opengroup -MIT-enna -MIT-feh -MPL-1.1 -MPL-2.0 -MPL-2.0-no-copyleft-exception -MS-PL -MTLL -MakeIndex -NCSA -NTP -NetCDF -Nunit -OFL-1.0 -OFL-1.1 -OLDAP-2.0.1 -OLDAP-2.8 -OML -OSL-2.0 -OpenSSL -PHP-3.0 -PHP-3.01 -Plexus -PostgreSQL -Public-Domain -Python-2.0 -QPL-1.0 -Qhull -RSA-MD -Rdisc -Ruby -SAX-PD -SGI-B-1.0 -SGI-B-1.1 -SGI-B-2.0 -SISSL -SPL-1.0 -Saxpath -Sleepycat -TCL -TMate -Unicode-TOU -Unlicense -Vim -W3C -W3C-19980720 -WTFPL -Wsuipa -X11 -ZPL-2.0 -ZPL-2.1 -Zend-2.0 -Zlib -bzip2-1.0.5 -bzip2-1.0.6 -gnuplot -libtiff -psutils -zlib-acknowledgement - -The following licenses are not standard spdx identifiers: -- Copyright -- Distributable -- Public-Domain - -These are used for projects that have explicitly granted redistribution -of the project source code, but don't have a typical OSI approved -license identifier. - diff --git a/stacks/dlrs/oss/licenses/horovod_LICENSE b/stacks/dlrs/oss/licenses/horovod_LICENSE deleted file mode 100644 index 91c27eb..0000000 --- a/stacks/dlrs/oss/licenses/horovod_LICENSE +++ /dev/null @@ -1,274 +0,0 @@ - Horovod - Copyright 2018 Uber Technologies, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Horovod includes: - - FlatBuffers - Copyright (c) 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - baidu-research/tensorflow-allreduce - Copyright (c) 2015, The TensorFlow Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - NVIDIA/cutlass - Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the NVIDIA CORPORATION nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/stacks/dlrs/pytorch/mkl/Dockerfile b/stacks/dlrs/pytorch/mkl/Dockerfile deleted file mode 100644 index c9a152a..0000000 --- a/stacks/dlrs/pytorch/mkl/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -#-------------------------------------------------------------------- -# Base image to build MKL version of Pytorch on ClearLinux OS -#-------------------------------------------------------------------- -ARG clear_ver -FROM stacks-clearlinux:$clear_ver as base -LABEL maintainer=otc-swstacks@intel.com -# FIXME: Until Moby finds a way for saving ARGs in multi-stage builds (see https://github.com/moby/moby/issues/34129) -# we have to re-declare clear_ver -ARG clear_ver -ARG swupd_args=$clear_ver -# update os and add pkgs -RUN swupd update -m $swupd_args && swupd bundle-add wget \ - openssh-server devpkg-openmpi git which \ - && rm -rf /var/lib/swupd/* -# copy and execute installation scripts -COPY ./scripts /scripts -RUN cd /scripts \ - && ./install_conda.sh \ - && ./install_torch_deps.sh \ - && ./install_pytorch.sh \ - && ./install_torchvision.sh \ - && ./install_utils.sh \ - && cd / && rm -rf /scripts \ - && rm -rf /opt/conda/pkgs/mkl* - -# cv2 deps -RUN /opt/conda/bin/conda install -y -c conda-forge \ - xorg-libsm xorg-libxrender \ - xorg-libxext xorg-libxau \ - && mv /opt/conda/compiler_compat/ld /opt/conda/compiler_compat/ld.orig \ - && /opt/conda/bin/conda clean -afy \ - && rm -f /opt/conda/bin/ffmpeg \ - && rm -f /opt/conda/bin/jasper \ - && find /opt/conda/ -follow -type f -name '*.a' -delete \ - && find /opt/conda/ -follow -type f -name '*.pyc' -delete \ - && find /opt/conda/ -follow -type f -name '*.js.map' -delete -#-------------------------------------------------------------------- -# Pytorch CPU on ClearLinux -#-------------------------------------------------------------------- -ARG clear_ver -FROM stacks-clearlinux:$clear_ver -LABEL maintainer=otc-swstacks@intel.com -ARG clear_ver -ARG swupd_args=$clear_ver -# update os and add pkgs -RUN swupd update -m $swupd_args && swupd bundle-add \ - openssh-server openmpi git sysadmin-basic devpkg-gperftools \ - && rm -rf /var/lib/swupd/* \ - && ln -s /usr/lib64/libtcmalloc.so /usr/lib/libtcmalloc.so - -COPY --from=base /opt/conda/ /opt/conda -#init -WORKDIR /workspace -COPY ./scripts/generate_defaults.py /workspace -RUN echo "export PATH=/opt/conda/bin:$PATH" >> /.bashrc \ - && echo "export LD_LIBRARY_PATH=/usr/lib64:/opt/conda/lib" >> /.bashrc \ - && /opt/conda/bin/python generate_defaults.py --generate \ - && cat mkl_env.sh >> /.bashrc \ - && chmod -R a+w /workspace -SHELL ["/bin/bash", "-c", "source /.bashrc"] diff --git a/stacks/dlrs/pytorch/mkl/README.md b/stacks/dlrs/pytorch/mkl/README.md deleted file mode 100644 index d3efa09..0000000 --- a/stacks/dlrs/pytorch/mkl/README.md +++ /dev/null @@ -1,22 +0,0 @@ -## Deep Learning Reference Stack with Pytorch and Intel® MKL-DNN - -[![](https://images.microbadger.com/badges/image/clearlinux/stacks-pytorch-mkl.svg)](https://microbadger.com/images/clearlinux/stacks-pytorch-mkl "Get your own image badge on microbadger.com") - -### Building Locally - -Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg - ->NOTE: This command is for locally building this image alone. - -``` -docker build --no-cache --build-arg clear_ver="30650" -t clearlinux/stacks-pytorch-mkl . -``` - -### Build ARGs - -* `clear_ver` specifies the latest validated Clearlinux version for this DLRS Dockerfile. ->NOTE: Changing this version may result in errors, if you want to upgrade the OS version, you should use `swupd_args` instead. - -* `swupd_args` specifies [swupd update](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags passed to the update during build. - ->NOTE: An empty `swupd_args` will default to 30650. Consider this when building as an OS upgrade won't be performed. If you'd like to upgrade the OS version, you can either do it manually inside a running container or add `swupd_args=""` to the build command. The latest validated version is 30650, using a different one might result in unexpected errors. diff --git a/stacks/dlrs/pytorch/mkl/licenses/README.md b/stacks/dlrs/pytorch/mkl/licenses/README.md deleted file mode 100644 index d0ba966..0000000 --- a/stacks/dlrs/pytorch/mkl/licenses/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Additional details on licenses - -As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/stacks/dlrs/pytorch/mkl/licenses/clear_LICENSE b/stacks/dlrs/pytorch/mkl/licenses/clear_LICENSE deleted file mode 100644 index d80df35..0000000 --- a/stacks/dlrs/pytorch/mkl/licenses/clear_LICENSE +++ /dev/null @@ -1,161 +0,0 @@ - -List of licenses used in Clear Linux OS. - -This list is automatically generated. If you spot a mistake or -omission, please mention this on dev@lists.clearlinux.org. - -To read the full license text for these licenses, please visit -http://spdx.org/licenses/. A few licenses in this list are not -declared on the http://spdx.org/licenses/ website, they are listed -at the bottom of this list. - -AFL-2.0 -AFL-2.1 -AGPL-3.0 -AML -ANTLR-PD -APSL-2.0 -Apache-1.1 -Apache-2.0 -Artistic-1.0 -Artistic-1.0-Perl -Artistic-2.0 -BSD-2-Clause -BSD-2-Clause-FreeBSD -BSD-2-Clause-NetBSD -BSD-3-Clause -BSD-3-Clause-Attribution -BSD-3-Clause-Clear -BSD-3-Clause-LBNL -BSD-4-Clause -BSD-4-Clause-UC -BSL-1.0 -CC-BY-2.0 -CC-BY-3.0 -CC-BY-4.0 -CC-BY-ND-4.0 -CC-BY-SA-2.0 -CC-BY-SA-3.0 -CC-BY-SA-4.0 -CC0-1.0 -CDDL-1.0 -CDDL-1.1 -CECILL-1.1 -CECILL-B -CPL-1.0 -ClArtistic -Distributable -EPL-1.0 -Eurosym -FSFAP -FSFULLR -FTL -GFDL-1.1 -GFDL-1.2 -GFDL-1.3 -GFDL-1.3+ -GL2PS -GPL-1.0 -GPL-1.0+ -GPL-2.0 -GPL-2.0+ -GPL-2.0-only -GPL-2.0-or-later -GPL-3.0 -GPL-3.0+ -GPL-3.0-only -HPND -ICU -IJG -IPA -ISC -ImageMagick -Imlib2 -Intel -JSON -JasPer-2.0 -LAL-1.2 -LGPL-2.0 -LGPL-2.0+ -LGPL-2.1 -LGPL-2.1+ -LGPL-2.1-only -LGPL-3.0 -LGPL-3.0+ -LGPL-3.0-only -LPL-1.0 -LPPL-1.0 -LPPL-1.2 -LPPL-1.3a -LPPL-1.3c -Libpng -MIT -MIT-Opengroup -MIT-enna -MIT-feh -MPL-1.1 -MPL-2.0 -MPL-2.0-no-copyleft-exception -MS-PL -MTLL -MakeIndex -NCSA -NTP -NetCDF -Nunit -OFL-1.0 -OFL-1.1 -OLDAP-2.0.1 -OLDAP-2.8 -OML -OSL-2.0 -OpenSSL -PHP-3.0 -PHP-3.01 -Plexus -PostgreSQL -Public-Domain -Python-2.0 -QPL-1.0 -Qhull -RSA-MD -Rdisc -Ruby -SAX-PD -SGI-B-1.0 -SGI-B-1.1 -SGI-B-2.0 -SISSL -SPL-1.0 -Saxpath -Sleepycat -TCL -TMate -Unicode-TOU -Unlicense -Vim -W3C -W3C-19980720 -WTFPL -Wsuipa -X11 -ZPL-2.0 -ZPL-2.1 -Zend-2.0 -Zlib -bzip2-1.0.5 -bzip2-1.0.6 -gnuplot -libtiff -psutils -zlib-acknowledgement - -The following licenses are not standard spdx identifiers: -- Copyright -- Distributable -- Public-Domain - -These are used for projects that have explicitly granted redistribution -of the project source code, but don't have a typical OSI approved -license identifier. - diff --git a/stacks/dlrs/pytorch/mkl/licenses/horovod_LICENSE b/stacks/dlrs/pytorch/mkl/licenses/horovod_LICENSE deleted file mode 100644 index 91c27eb..0000000 --- a/stacks/dlrs/pytorch/mkl/licenses/horovod_LICENSE +++ /dev/null @@ -1,274 +0,0 @@ - Horovod - Copyright 2018 Uber Technologies, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Horovod includes: - - FlatBuffers - Copyright (c) 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - baidu-research/tensorflow-allreduce - Copyright (c) 2015, The TensorFlow Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - NVIDIA/cutlass - Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the NVIDIA CORPORATION nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/stacks/dlrs/pytorch/mkl/licenses/miniconda_LICENSE b/stacks/dlrs/pytorch/mkl/licenses/miniconda_LICENSE deleted file mode 100644 index 11b5cde..0000000 --- a/stacks/dlrs/pytorch/mkl/licenses/miniconda_LICENSE +++ /dev/null @@ -1,44 +0,0 @@ -=================================== -Miniconda End User License Agreement -=================================== - -Copyright 2015, Anaconda, Inc. - -All rights reserved under the 3-clause BSD License: - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Anaconda, Inc. ("Anaconda, Inc.") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANACONDA, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Notice of Third Party Software Licenses -======================================= - -Miniconda contains open source software packages from third parties. These are available on an "as is" basis and subject to their individual license agreements. These licenses are available in Anaconda Distribution or at http://docs.anaconda.com/anaconda/pkg-docs. Any binary packages of these third party tools you obtain via Anaconda Distribution are subject to their individual licenses as well as the Anaconda license. Anaconda, Inc. reserves the right to change which third party tools are provided in Miniconda. - -Cryptography Notice -=================== - -This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See the Wassenaar Arrangement http://www.wassenaar.org/ for more information. - -Anaconda, Inc. has self-classified this software as Export Commodity Control Number (ECCN) 5D992b, which includes mass market information security software using or performing cryptographic functions with asymmetric algorithms. No license is required for export of this software to non-embargoed countries. In addition, the Intel(TM) Math Kernel Library contained in Anaconda, Inc.'s software is classified by Intel(TM) as ECCN 5D992b with no license required for export to non-embargoed countries. - -The following packages are included in this distribution that relate to cryptography: - -openssl - The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols as well as a full-strength general purpose cryptography library. - -pycrypto - A collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal, etc.). - -pyopenssl - A thin Python wrapper around (a subset of) the OpenSSL library. - -kerberos (krb5, non-Windows platforms) - A network authentication protocol designed to provide strong authentication for client/server applications by using secret-key cryptography. - -cryptography - A Python library which exposes cryptographic recipes and primitives. \ No newline at end of file diff --git a/stacks/dlrs/pytorch/mkl/licenses/mkl_LICENSE b/stacks/dlrs/pytorch/mkl/licenses/mkl_LICENSE deleted file mode 100644 index 817590f..0000000 --- a/stacks/dlrs/pytorch/mkl/licenses/mkl_LICENSE +++ /dev/null @@ -1,41 +0,0 @@ -Copyright (c) 2018 Intel Corporation. - -Use and Redistribution. You may use and redistribute the software (the “Software”), without modification, provided the following conditions are met: - -* Redistributions must reproduce the above copyright notice and the following terms of use in the Software and in the documentation and/or other materials provided with the distribution. - -* Neither the name of Intel nor the names of its suppliers may be used to endorse or promote products derived from this Software without specific prior written permission. - -* No reverse engineering, decompilation, or disassembly of this Software is permitted. - -Limited patent license. Intel grants you a world-wide, royalty-free, non-exclusive license under patents it now or hereafter owns or controls to make, have made, use, import, offer to sell -and sell (“Utilize”) this Software, but solely to the extent that any such patent is necessary to Utilize the Software alone. The patent license shall not apply to any combinations which include -this software. No hardware per se is licensed hereunder. - -Third party and other Intel programs. “Third Party Programs” are the files listed in the “third-party-programs.txt” text file that is included with the Software and may include Intel programs under -separate license terms. Third Party Programs, even if included with the distribution of the Materials, are governed by separate license terms and those license terms solely govern your use of those programs. - -DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND -NON-INFRINGEMENT ARE DISCLAIMED. THIS SOFTWARE IS NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS WHERE FAILURE OF THE SOFTWARE MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE THAT YOU ARE FULLY -RESPONSIBLE FOR ANY CLAIMS, COSTS, DAMAGES, EXPENSES, AND ATTORNEYS’ FEES ARISING OUT OF ANY SUCH USE, EVEN IF ANY CLAIM ALLEGES THAT INTEL WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. - -LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. YOU AGREE TO INDEMNIFY AND HOLD INTEL HARMLESS AGAINST ANY CLAIMS AND EXPENSES RESULTING FROM -YOUR USE OR UNAUTHORIZED USE OF THE SOFTWARE. - -No support. Intel may make changes to the Software, at any time without notice, and is not obligated to support, update or provide training for the Software. - -Termination. Intel may terminate your right to use the Software in the event of your breach of this Agreement and you fail to cure the breach within a reasonable period of time. - -Feedback. Should you provide Intel with comments, modifications, corrections, enhancements or other input (“Feedback”) related to the Software Intel will be free to use, disclose, reproduce, -license or otherwise distribute or exploit the Feedback in its sole discretion without any obligations or restrictions of any kind, including without limitation, intellectual property rights or -licensing obligations. - -Compliance with laws. You agree to comply with all relevant laws and regulations governing your use, transfer, import or export (or prohibition thereof) of the Software. - -Governing law. All disputes will be governed by the laws of the United States of America and the State of Delaware without reference to conflict of law principles and subject to the exclusive -jurisdiction of the state or federal courts sitting in the State of Delaware, and each party agrees that it submits to the personal jurisdiction and venue of those courts and waives any objections. -The United Nations Convention on Contracts for the International Sale of Goods (1980) is specifically excluded and will not apply to the Software. - -*Other names and brands may be claimed as the property of others. \ No newline at end of file diff --git a/stacks/dlrs/pytorch/mkl/licenses/pytorch_LICENSE b/stacks/dlrs/pytorch/mkl/licenses/pytorch_LICENSE deleted file mode 100644 index 4167b92..0000000 --- a/stacks/dlrs/pytorch/mkl/licenses/pytorch_LICENSE +++ /dev/null @@ -1,70 +0,0 @@ -From PyTorch: - -Copyright (c) 2016- Facebook, Inc (Adam Paszke) -Copyright (c) 2014- Facebook, Inc (Soumith Chintala) -Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) -Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) -Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) -Copyright (c) 2011-2013 NYU (Clement Farabet) -Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston) -Copyright (c) 2006 Idiap Research Institute (Samy Bengio) -Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz) - -From Caffe2: - -Copyright (c) 2016-present, Facebook Inc. All rights reserved. - -All contributions by Facebook: -Copyright (c) 2016 Facebook Inc. - -All contributions by Google: -Copyright (c) 2015 Google Inc. -All rights reserved. - -All contributions by Yangqing Jia: -Copyright (c) 2015 Yangqing Jia -All rights reserved. - -All contributions from Caffe: -Copyright(c) 2013, 2014, 2015, the respective contributors -All rights reserved. - -All other contributions: -Copyright(c) 2015, 2016 the respective contributors -All rights reserved. - -Caffe2 uses a copyright model similar to Caffe: each contributor holds -copyright over their contributions to Caffe2. The project versioning records -all such contribution and copyright details. If a contributor wants to further -mark their specific copyright on a particular contribution, they should -indicate their copyright solely in the commit message of the change when it is -committed. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America - and IDIAP Research Institute nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/stacks/dlrs/pytorch/mkl/scripts/deps/conda.deps b/stacks/dlrs/pytorch/mkl/scripts/deps/conda.deps deleted file mode 100644 index f366ade..0000000 --- a/stacks/dlrs/pytorch/mkl/scripts/deps/conda.deps +++ /dev/null @@ -1,115 +0,0 @@ -# This file may be used to create an environment using: -# $ conda create --name --file -# platform: linux-64 -_libgcc_mutex=0.1=main -alembic=1.0.10=py_0 -asn1crypto=0.24.0=py37_0 -async_generator=1.10=py37h28b3542_0 -backcall=0.1.0=py37_0 -blas=1.0=mkl -bzip2=1.0.6=h14c3975_5 -ca-certificates=2019.5.15=0 -cairo=1.14.12=h8948797_3 -certifi=2019.6.16=py37_0 -cffi=1.12.2=py37h2e261b9_1 -chardet=3.0.4=py37_1 -conda=4.7.5=py37_0 -conda-package-handling=1.3.10=py37_0 -configurable-http-proxy=4.0.1=node6_0 -cryptography=2.6.1=py37h1ba5d50_0 -decorator=4.4.0=py37_1 -ffmpeg=4.0=hcdf2ecd_0 -fontconfig=2.13.0=h9420a91_0 -freeglut=3.0.0=hf484d3e_5 -freetype=2.9.1=h8a8886c_1 -glib=2.56.2=hd408876_0 -graphite2=1.3.13=h23475e2_0 -harfbuzz=1.8.8=hffaf4a1_0 -hdf5=1.10.2=hba1933b_1 -icu=58.2=h9c2bf20_1 -idna=2.8=py37_0 -intel-openmp=2019.4=243 -ipython=7.6.0=py37h39e3cac_0 -ipython_genutils=0.2.0=py37_0 -jasper=2.0.14=h07fcdf6_1 -jedi=0.13.3=py37_0 -jinja2=2.10.1=py37_0 -jpeg=9b=h024ee3a_2 -jupyterhub=0.9.6=py37_0 -krb5=1.16.1=h173b8e3_7 -libarchive=3.3.3=h5d8350f_5 -libcurl=7.64.1=h20c2e04_0 -libedit=3.1.20181209=hc058e9b_0 -libffi=3.2.1=hd88cf55_4 -libgcc=7.2.0=h69d50b8_2 -libgcc-ng=8.2.0=hdf63c60_1 -libgfortran-ng=7.3.0=hdf63c60_0 -libglu=9.0.0=hf484d3e_1 -libopencv=3.4.2=hb342d67_1 -libopus=1.3=h7b6447c_0 -libpng=1.6.37=hbc83047_0 -libssh2=1.8.2=h1ba5d50_0 -libstdcxx-ng=9.1.0=hdf63c60_0 -libtiff=4.0.10=h2733197_2 -libuuid=1.0.3=h1bed415_2 -libvpx=1.7.0=h439df22_0 -libxcb=1.13=h1bed415_1 -libxml2=2.9.9=hea5a465_1 -lz4-c=1.8.1.2=h14c3975_0 -lzo=2.10=h49e0be7_2 -mako=1.0.10=py_0 -markupsafe=1.1.1=py37h7b6447c_0 -mkl=2019.4=243 -mkl-include=2019.4=243 -mkl_fft=1.0.12=py37ha843d7b_0 -mkl_random=1.0.2=py37hd81dba3_0 -ncurses=6.1=he6710b0_1 -ninja=1.9.0=py37hfd86e86_0 -nodejs=6.11.2=h3db8ef7_0 -numpy=1.16.4=py37h7e9f1db_0 -numpy-base=1.16.4=py37hde5b4d6_0 -olefile=0.46=py37_0 -opencv=3.4.2=py37h6fd60c2_1 -openssl=1.1.1=h7b6447c_0 -pamela=1.0.0=py_0 -parso=0.5.0=py_0 -pcre=8.43=he6710b0_0 -pexpect=4.7.0=py37_0 -pickleshare=0.7.5=py37_0 -pillow=6.0.0=py37h34e0f95_0 -pip=19.0.3=py37_0 -pixman=0.38.0=h7b6447c_0 -prometheus_client=0.7.1=py_0 -prompt_toolkit=2.0.9=py37_0 -ptyprocess=0.6.0=py37_0 -py-opencv=3.4.2=py37hb342d67_1 -pycosat=0.6.3=py37h14c3975_0 -pycparser=2.19=py37_0 -pycurl=7.43.0.3=py37h1ba5d50_0 -pygments=2.4.2=py_0 -pyopenssl=19.0.0=py37_0 -pysocks=1.6.8=py37_0 -python=3.7.3=h0371630_0 -python-dateutil=2.8.0=py37_0 -python-editor=1.0.4=py_0 -python-libarchive-c=2.8=py37_6 -python-oauth2=1.1.0=py37h28b3542_1 -pyyaml=5.1.1=py37h7b6447c_0 -readline=7.0=h7b6447c_5 -requests=2.21.0=py37_0 -ruamel_yaml=0.15.46=py37h14c3975_0 -setuptools=41.0.0=py37_0 -six=1.12.0=py37_0 -sqlalchemy=1.3.5=py37h7b6447c_0 -sqlite=3.27.2=h7b6447c_0 -tk=8.6.8=hbc83047_0 -tornado=6.0.3=py37h7b6447c_0 -tqdm=4.32.1=py_0 -traitlets=4.3.2=py37_0 -urllib3=1.24.1=py37_0 -wcwidth=0.1.7=py37_0 -wheel=0.33.1=py37_0 -xz=5.2.4=h14c3975_4 -yaml=0.1.7=had09818_2 -zlib=1.2.11=h7b6447c_3 -zstd=1.3.7=h0b5b093_0 diff --git a/stacks/dlrs/pytorch/mkl/scripts/deps/pip.deps b/stacks/dlrs/pytorch/mkl/scripts/deps/pip.deps deleted file mode 100644 index 5fe6fa4..0000000 --- a/stacks/dlrs/pytorch/mkl/scripts/deps/pip.deps +++ /dev/null @@ -1,32 +0,0 @@ -asn1crypto==0.24.0 -attrs==19.1.0 -certifi==2019.6.16 -cffi==1.12.2 -chardet==3.0.4 -Click==7.0 -conda==4.7.5 -conda-package-handling==1.3.10 -cryptography==2.6.1 -decorator==4.4.0 -future==0.17.1 -hypothesis==4.25.1 -idna==2.8 -ipykernel==5.1.1 -libarchive-c==2.8 -mkl-fft==1.0.12 -mkl-random==1.0.2 -networkx==2.3 -numpy==1.16.4 -olefile==0.46 -onnx==1.5.0 -Pillow==6.0.0 -protobuf==3.8.0 -pycosat==0.6.3 -pycparser==2.19 -pyOpenSSL==19.0.0 -PySocks==1.6.8 -requests==2.21.0 -ruamel-yaml==0.15.46 -six==1.12.0 -tqdm==4.32.1 -urllib3==1.24.1 diff --git a/stacks/dlrs/pytorch/mkl/scripts/generate_defaults.py b/stacks/dlrs/pytorch/mkl/scripts/generate_defaults.py deleted file mode 100755 index c3c6a83..0000000 --- a/stacks/dlrs/pytorch/mkl/scripts/generate_defaults.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" Helper script that generates a file with sane defaults that can be sourced when using MKL_DNN optimized DLRS stack. - We recommend you fine tune the exported env variables based on the workload. More details can be found at: - https://github.com/IntelAI/models/blob/master/docs/general/tensorflow_serving/GeneralBestPractices.md. - To get further details, try --verbose.""" - -import os -import argparse -import subprocess -import sys - -import psutil - -parser = argparse.ArgumentParser(description=__doc__) -parser.add_argument( - "-v", - "--verbose", - action="store_true", - help="detailed info on the variables being set", -) -parser.add_argument( - "-g", - "--generate", - action="store_true", - help="generate 'mkl_env.sh' file with default settings for MKL DNN", - required=False, -) -args = parser.parse_args() - - -def main(): - sockets = int( - subprocess.check_output( - 'cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l', shell=True - ) - ) - physical_cores = psutil.cpu_count(logical=False) - vars = {} - vars["OMP_NUM_THREADS"] = { - "value": physical_cores, - "help": "Number of OpenMP threads", - } - vars["KMP_BLOCKTIME"] = { - "value": 1, - "help": "Thread waits until set ms after execution.", - } - vars["KMP_AFFINITY"] = { - "value": "granularity=fine,verbose,compact,1,0", - "help": "OpenMP threads bound to single thread context compactly", - } - vars["INTRA_OP_PARALLELISM_THREADS"] = { - "value": physical_cores, - "help": "scheme for individual op", - } - vars["INTER_OP_PARALLELISM_THREADS"] = { - "value": sockets, - "help": "parllelizing scheme for independent ops", - } - if args.verbose: - print( - ( - "variables that can be used to fine tune performance,\n" - "use '-g' or '--generate' to generate a file with these variables\n" - ) - ) - for var, val in vars.items(): - print("variable: {}, description: {}".format(var, val["help"])) - if args.generate: - print("Generating default env vars for MKL and OpenMP, stored in /workspace/mkl_env.sh ") - for var, val in vars.items(): - print( - "export {}={}".format(var, str(val["value"])), - file=open("mkl_env.sh", "a"), - ) - - -if __name__ == "__main__": - main() diff --git a/stacks/dlrs/pytorch/mkl/scripts/install_conda.sh b/stacks/dlrs/pytorch/mkl/scripts/install_conda.sh deleted file mode 100755 index b94a631..0000000 --- a/stacks/dlrs/pytorch/mkl/scripts/install_conda.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -set -e -set -u -set -o pipefail - -export PYTHON_VERSION=3.7 -export MINICONDA_VERSION=latest -export PATH=/opt/conda/bin:$PATH -echo "=================get and install conda========================" -if [ ! -d "/opt/conda" ]; then - wget https://repo.continuum.io/miniconda/Miniconda3-$MINICONDA_VERSION-Linux-x86_64.sh -O /tmp/miniconda.sh - chmod +x /tmp/miniconda.sh \ - && /tmp/miniconda.sh -b -p /opt/conda \ - && rm -rf /tmp/* -fi -echo "==================done= =========================================" diff --git a/stacks/dlrs/pytorch/mkl/scripts/install_pytorch.sh b/stacks/dlrs/pytorch/mkl/scripts/install_pytorch.sh deleted file mode 100755 index 964d455..0000000 --- a/stacks/dlrs/pytorch/mkl/scripts/install_pytorch.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -set -e -set -o pipefail - -export PATH=/opt/conda/bin/:$PATH -export GCC_IGNORE_WERROR=1 -export CFLAGS="$CFLAGS -O3 -mfma -mtune=skylake-avx512" -export CXXFLAGS="$CXXFLAGS -O3 -mfma -mtune-skylake-avx512" -export GIT_HASH=v1.1.0 -export CMAKE_PREFIX_PATH=/opt/conda -# linker fix -[ -f /opt/conda/compiler_compat/ld ] && mv /opt/conda/compiler_compat/ld /opt/conda/compiler_compat/ld.org -echo "=================get pytorch=================================" -if [ ! -d ./pytorch/ ]; then - git clone https://github.com/pytorch/pytorch.git \ - && cd pytorch && git checkout $GIT_HASH && git submodule update --init --recursive \ - && cd .. -fi -echo "=================build and install pytorch with MKL=============" -cd ./pytorch/ \ - && python setup.py build && python setup.py install \ - && cd / && rm -rf /scripts/pytorch \ - && find /opt/conda/ -follow -type f -name '*.js.map' -delete \ - && find /opt/conda/ -follow -type f -name '*.pyc' -delete -echo "======================done======================================" - diff --git a/stacks/dlrs/pytorch/mkl/scripts/install_torch_deps.sh b/stacks/dlrs/pytorch/mkl/scripts/install_torch_deps.sh deleted file mode 100755 index 8123241..0000000 --- a/stacks/dlrs/pytorch/mkl/scripts/install_torch_deps.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -set -e -set -u -set -o pipefail - -export PATH=/opt/conda/bin:$PATH -echo "=================install pytorch from conda=====================" -conda config --env --ad channels pytorch \ - && conda config --env --ad channels anaconda \ - && conda install --file ./deps/conda.deps \ - && conda clean -ay \ - && find /opt/conda/ -follow -type f -name '*.js.map' -delete \ - && find /opt/conda/ -follow -type f -name '*.pyc' -delete \ - && rm -rf ./deps/conda.deps \ - && rm -rf /tmp/* -echo "==================done==========================================" diff --git a/stacks/dlrs/pytorch/mkl/scripts/install_torchvision.sh b/stacks/dlrs/pytorch/mkl/scripts/install_torchvision.sh deleted file mode 100755 index d4c0334..0000000 --- a/stacks/dlrs/pytorch/mkl/scripts/install_torchvision.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -set -e -set -o pipefail - -export PATH=/opt/conda/bin/:$PATH -export GCC_IGNORE_WERROR=1 -export CFLAGS="$CFLAGS -O3 -mfma -mtune=skylake-avx512" -export CXXFLAGS="$CXXFLAGS -O3 -mfma -mtune-skylake-avx512" -export GIT_HASH=v1.1.0 -export CMAKE_PREFIX_PATH=/opt/conda -# linker fix -[ -f /opt/conda/compiler_compat/ld ] && mv /opt/conda/compiler_compat/ld /opt/conda/compiler_compat/ld.org -echo "=================build and install torchvision==================" -git clone https://github.com/pytorch/vision.git \ - && cd vision && python setup.py build && python setup.py install \ - && cd / && rm -rf /scripts/vision \ - && find /opt/conda/ -follow -type f -name '*.js.map' -delete \ - && find /opt/conda/ -follow -type f -name '*.pyc' -delete -echo "======================done======================================" diff --git a/stacks/dlrs/pytorch/mkl/scripts/install_utils.sh b/stacks/dlrs/pytorch/mkl/scripts/install_utils.sh deleted file mode 100755 index e729874..0000000 --- a/stacks/dlrs/pytorch/mkl/scripts/install_utils.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -set -e -set -u -set -o pipefail - -export PATH=/opt/conda/bin:$PATH -echo "=================install utilities=============================" -pip --no-cache-dir install -r ./deps/pip.deps \ - && pip --no-cache-dir install typing-extensions horovod opencv-python==4.1.0.25 \ - && mv /opt/conda/compiler_compat/ld.org /opt/conda/compiler_compat/ld \ - && mv /opt/conda/lib/libtinfo.so.6 /opt/conda/lib/libtinfo.so.6.org \ - && find /opt/conda/ -follow -type f -name '*.js.map' -delete \ - && find /opt/conda/ -follow -type f -name '*.pyc' -delete \ - && python -m ipykernel install --user \ - && npm cache clean --force \ - && rm -rf /tmp/* \ - && rm ./deps/pip.deps -echo "==================done==========================================" diff --git a/stacks/dlrs/pytorch/mkl/scripts/mkl_env.sh b/stacks/dlrs/pytorch/mkl/scripts/mkl_env.sh deleted file mode 100755 index 803698d..0000000 --- a/stacks/dlrs/pytorch/mkl/scripts/mkl_env.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# Copyright (c) 2019 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -export OMP_NUM_THEADS=10 -export KMP_BLOCKTIME=2 -export KMP_AFFINITY=granularity=fine,verbose,compact,1,0 -export INTRA_OP_PARALLELISM_THREADS=10 -export INTER_OP_PARALLELISM_THREADS=1 diff --git a/stacks/dlrs/pytorch/oss/Dockerfile b/stacks/dlrs/pytorch/oss/Dockerfile deleted file mode 100644 index c446e72..0000000 --- a/stacks/dlrs/pytorch/oss/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# OSS version of Pytorch on Clear OS -ARG clear_ver -FROM stacks-clearlinux:$clear_ver -LABEL maintainer=otc-swstacks@intel.com - -# FIXME: Until Moby finds a way for saving ARGs in multi-stage builds (see https://github.com/moby/moby/issues/34129) -# we have to re-declare clear_ver -ARG clear_ver -ARG swupd_args=$clear_ver - -# update os and install pytorch -RUN swupd update -m $swupd_args && \ - swupd bundle-add devpkg-openmpi \ - devpkg-libpng desktop-gnomelibs \ - openssh-server \ - sysadmin-basic \ - devpkg-gperftools \ - machine-learning-pytorch \ - git user-basic-dev \ - && ln -s /usr/lib64/libtcmalloc.so /usr/lib/libtcmalloc.so - -# install additional python packages for vision, horovod and notebook -RUN pip --no-cache-dir install torchvision -RUN pip --no-cache-dir install ipython ipykernel jupyter && \ - python -m ipykernel.kernelspec -RUN HOROVOD_WITH_TORCH=1 pip install --no-cache-dir horovod - -# setup onnx and helper packages for caffe2 -RUN pip install --no-cache-dir \ - future hypothesis protobuf onnx networkx opencv-python - -# clean up and init -WORKDIR /workspace -RUN chmod -R a+w /workspace -CMD /bin/bash diff --git a/stacks/dlrs/pytorch/oss/README.md b/stacks/dlrs/pytorch/oss/README.md deleted file mode 100644 index 64cd8ca..0000000 --- a/stacks/dlrs/pytorch/oss/README.md +++ /dev/null @@ -1,22 +0,0 @@ -## Deep Learning Reference Stack with Pytorch and Intel® MKL-DNN - -[![](https://images.microbadger.com/badges/image/clearlinux/stacks-pytorch-mkl.svg)](https://microbadger.com/images/clearlinux/stacks-pytorch-mkl "Get your own image badge on microbadger.com") - -### Building Locally - -Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg - ->NOTE: This command is for locally building this image alone. - -``` -docker build --no-cache --build-arg clear_ver="30650" -t clearlinux/stacks-pytorch-oss . -``` - -### Build ARGs - -* `clear_ver` specifies the latest validated Clearlinux version for this DLRS Dockerfile. ->NOTE: Changing this version may result in errors, if you want to upgrade the OS version, you should use `swupd_args` instead. - -* `swupd_args` specifies [swupd update](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags passed to the update during build. - ->NOTE: An empty `swupd_args` will default to 30650. Consider this when building as an OS upgrade won't be performed. If you'd like to upgrade the OS version, you can either do it manually inside a running container or add `swupd_args=""` to the build command. The latest validated version is 30650, using a different one might result in unexpected errors. diff --git a/stacks/dlrs/pytorch/oss/licenses/README.md b/stacks/dlrs/pytorch/oss/licenses/README.md deleted file mode 100644 index d0ba966..0000000 --- a/stacks/dlrs/pytorch/oss/licenses/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Additional details on licenses - -As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/stacks/dlrs/pytorch/oss/licenses/clear_LICENSE b/stacks/dlrs/pytorch/oss/licenses/clear_LICENSE deleted file mode 100644 index d80df35..0000000 --- a/stacks/dlrs/pytorch/oss/licenses/clear_LICENSE +++ /dev/null @@ -1,161 +0,0 @@ - -List of licenses used in Clear Linux OS. - -This list is automatically generated. If you spot a mistake or -omission, please mention this on dev@lists.clearlinux.org. - -To read the full license text for these licenses, please visit -http://spdx.org/licenses/. A few licenses in this list are not -declared on the http://spdx.org/licenses/ website, they are listed -at the bottom of this list. - -AFL-2.0 -AFL-2.1 -AGPL-3.0 -AML -ANTLR-PD -APSL-2.0 -Apache-1.1 -Apache-2.0 -Artistic-1.0 -Artistic-1.0-Perl -Artistic-2.0 -BSD-2-Clause -BSD-2-Clause-FreeBSD -BSD-2-Clause-NetBSD -BSD-3-Clause -BSD-3-Clause-Attribution -BSD-3-Clause-Clear -BSD-3-Clause-LBNL -BSD-4-Clause -BSD-4-Clause-UC -BSL-1.0 -CC-BY-2.0 -CC-BY-3.0 -CC-BY-4.0 -CC-BY-ND-4.0 -CC-BY-SA-2.0 -CC-BY-SA-3.0 -CC-BY-SA-4.0 -CC0-1.0 -CDDL-1.0 -CDDL-1.1 -CECILL-1.1 -CECILL-B -CPL-1.0 -ClArtistic -Distributable -EPL-1.0 -Eurosym -FSFAP -FSFULLR -FTL -GFDL-1.1 -GFDL-1.2 -GFDL-1.3 -GFDL-1.3+ -GL2PS -GPL-1.0 -GPL-1.0+ -GPL-2.0 -GPL-2.0+ -GPL-2.0-only -GPL-2.0-or-later -GPL-3.0 -GPL-3.0+ -GPL-3.0-only -HPND -ICU -IJG -IPA -ISC -ImageMagick -Imlib2 -Intel -JSON -JasPer-2.0 -LAL-1.2 -LGPL-2.0 -LGPL-2.0+ -LGPL-2.1 -LGPL-2.1+ -LGPL-2.1-only -LGPL-3.0 -LGPL-3.0+ -LGPL-3.0-only -LPL-1.0 -LPPL-1.0 -LPPL-1.2 -LPPL-1.3a -LPPL-1.3c -Libpng -MIT -MIT-Opengroup -MIT-enna -MIT-feh -MPL-1.1 -MPL-2.0 -MPL-2.0-no-copyleft-exception -MS-PL -MTLL -MakeIndex -NCSA -NTP -NetCDF -Nunit -OFL-1.0 -OFL-1.1 -OLDAP-2.0.1 -OLDAP-2.8 -OML -OSL-2.0 -OpenSSL -PHP-3.0 -PHP-3.01 -Plexus -PostgreSQL -Public-Domain -Python-2.0 -QPL-1.0 -Qhull -RSA-MD -Rdisc -Ruby -SAX-PD -SGI-B-1.0 -SGI-B-1.1 -SGI-B-2.0 -SISSL -SPL-1.0 -Saxpath -Sleepycat -TCL -TMate -Unicode-TOU -Unlicense -Vim -W3C -W3C-19980720 -WTFPL -Wsuipa -X11 -ZPL-2.0 -ZPL-2.1 -Zend-2.0 -Zlib -bzip2-1.0.5 -bzip2-1.0.6 -gnuplot -libtiff -psutils -zlib-acknowledgement - -The following licenses are not standard spdx identifiers: -- Copyright -- Distributable -- Public-Domain - -These are used for projects that have explicitly granted redistribution -of the project source code, but don't have a typical OSI approved -license identifier. - diff --git a/stacks/dlrs/pytorch/oss/licenses/horovod_LICENSE b/stacks/dlrs/pytorch/oss/licenses/horovod_LICENSE deleted file mode 100644 index 91c27eb..0000000 --- a/stacks/dlrs/pytorch/oss/licenses/horovod_LICENSE +++ /dev/null @@ -1,274 +0,0 @@ - Horovod - Copyright 2018 Uber Technologies, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Horovod includes: - - FlatBuffers - Copyright (c) 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - baidu-research/tensorflow-allreduce - Copyright (c) 2015, The TensorFlow Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - NVIDIA/cutlass - Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the NVIDIA CORPORATION nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/stacks/dlrs/pytorch/oss/licenses/pytorch_LICENSE b/stacks/dlrs/pytorch/oss/licenses/pytorch_LICENSE deleted file mode 100644 index 4167b92..0000000 --- a/stacks/dlrs/pytorch/oss/licenses/pytorch_LICENSE +++ /dev/null @@ -1,70 +0,0 @@ -From PyTorch: - -Copyright (c) 2016- Facebook, Inc (Adam Paszke) -Copyright (c) 2014- Facebook, Inc (Soumith Chintala) -Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) -Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) -Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) -Copyright (c) 2011-2013 NYU (Clement Farabet) -Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston) -Copyright (c) 2006 Idiap Research Institute (Samy Bengio) -Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz) - -From Caffe2: - -Copyright (c) 2016-present, Facebook Inc. All rights reserved. - -All contributions by Facebook: -Copyright (c) 2016 Facebook Inc. - -All contributions by Google: -Copyright (c) 2015 Google Inc. -All rights reserved. - -All contributions by Yangqing Jia: -Copyright (c) 2015 Yangqing Jia -All rights reserved. - -All contributions from Caffe: -Copyright(c) 2013, 2014, 2015, the respective contributors -All rights reserved. - -All other contributions: -Copyright(c) 2015, 2016 the respective contributors -All rights reserved. - -Caffe2 uses a copyright model similar to Caffe: each contributor holds -copyright over their contributions to Caffe2. The project versioning records -all such contribution and copyright details. If a contributor wants to further -mark their specific copyright on a particular contribution, they should -indicate their copyright solely in the commit message of the change when it is -committed. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America - and IDIAP Research Institute nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/stacks/dlrs/releasenote.md b/stacks/dlrs/releasenote.md deleted file mode 100644 index 3e04eb2..0000000 --- a/stacks/dlrs/releasenote.md +++ /dev/null @@ -1,185 +0,0 @@ - -# Deep Learning Reference Stack - -The Deep Learning Reference Stack, an integrated, highly-performant open source stack optimized for Intel® Xeon® Scalable platforms. This open source community release is part of our effort to ensure AI developers have easy access to all of the features and functionality of the Intel platforms. The Deep Learning Reference Stack is highly-tuned and built for cloud native environments. With this stack, we are enabling developers to quickly prototype by reducing the complexity associated with integrating multiple software components, while still giving users the flexibility to customize their solutions. This version includes additional components to provide greater flexibility and a more comprehensive take on the deep learning environment. - -# The Deep Learning Reference Stack Release - -To offer more flexibility, we are releasing multiple versions of the Deep Learning Reference Stack. All versions are built on top of the Clear Linux OS, which is optimized for IA. - - -> **Note:** - Clear Linux will be automatically updated to the latest release version in the container. The minimum validated version of Clear Linux for this stack is 30650. - -> **Note:** -> For multi-node support, we include a registry with a set of jsonnet files to show integration with Kubeflow for deployment. - -## The Deep Learning Reference Stack with Intel® MKL-DNN and Intel® AVX512-Deep Learning Boost - -The release includes: - * Clear Linux* OS - * TensorFlow 1.13.1 optimized using Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN) primitives and Intel® AVX-512 Deep Learning Boost (Formerly Intel® VNNI) - * Jupyter Lab* - -## The Deep Learning Reference Stack with Eigen - -The release includes: - * Clear Linux* OS - * TensorFlow 1.13.1 compiled with AVX2 and AVX512 optimizations - * Runtimes (python) - -## The Deep Learning Reference Stack with Intel® MKL-DNN - -The release includes: - * Clear Linux* OS - * Runtimes (python) - * TensorFlow 1.13.1 optimized using Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN) primitives. - -> **Note:** - When using the Deep Learning Reference Stack with Intel® MKL-DNN version, you may see this warning message: "tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA". This is because this version of the Deep Learning Reference Stack is using Intel® MKL-DNN for performance optimization rather than Intel® Advanced Vector Extensions 512, and is expected for this version of the Deep Learning Reference Stack. - -## The Deep Learning Reference Stack with PyTorch - -The release includes: - * Clear Linux* OS - * Runtimes (python) - * PyTorch with OpenBlAS - * Jupyter Notebooks - - -## The Deep Learning Reference Stack with PyTorch and Intel® MKL - -The release includes: - * Clear Linux* OS - * Runtimes (python) - * PyTorch optimized using the Intel® Math Kernel Library - * Jupyter Notebooks - - -## How to get the Deep Learning Reference Stack - -The official Deep Learning Reference Stack Docker images are hosted at: https://hub.docker.com/u/clearlinux/. Note that the Intel MKL-DNN-VNNI version is also referred to as the Intel® MKL with AVX-512 Deep Learning Boost in the documentation. - - * Pull from the [Intel MKL-DNN-VNNI version](https://hub.docker.com/r/clearlinux/stacks-dlrs-mkl-vnni) - * Pull from the [Eigen version](https://hub.docker.com/r/clearlinux/stacks-dlrs-oss/) - * Pull from the [Intel MKL-DNN version](https://hub.docker.com/r/clearlinux/stacks-dlrs-mkl/) - * Pull from the [PyTorch with OpenBLAS version](https://hub.docker.com/r/clearlinux/stacks-pytorch-oss) - * Pull from the [PyTorch with Intel MKL-DNN version](https://hub.docker.com/r/clearlinux/stacks-pytorch-mkl) - - -**Note:** - To take advantage of the AVX-512, and AVX-512 Deep Learning Boost functionality with the Deep Learning Reference Stack, please use the following hardware: - * AVX 512 images requires an Intel® Xeon® Scalable Platform - * AVX-512 Deep Learning Boost requires a Second-Generation Intel® Xeon® Scalable Platform - - -## Licensing - - -The Deep Learning Reference Stack is guided by the same [Terms of Use](https://download.clearlinux.org/TermsOfUse.html) declared by the Clear Linux project. The Docker images are hosted on https://hub.docker.com and as with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc. from the base distribution, along with any direct or indirect dependencies of the primary software being contained). - - - -# Working with the Deep Learning Reference Stack - - -The Deep Learning Reference Stack includes TensorFlow and Kubeflow support. -These software components were selected because they are most popular/widely used by developers and CSPs. Clear Linux provides optimizations across the entire OS stack for the ultimate end user performance and is customizable to meet your unique needs. TensorFlow was selected as it is the leading deep learning and machine learning framework. Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN) is an open source performance library for Deep Learning (DL) applications intended for acceleration of DL frameworks on Intel® architecture. Intel® MKL-DNN includes highly vectorized and threaded building blocks to implement convolutional neural networks (CNN) with C and C++ interfaces. Kubeflow is a project that provides a straightforward way to deploy simple, scalable and portable Machine Learning workflows on Kubernetes. This combination of an operating system, the deep learning framework and libraries, results in a performant deep learning software stack. - -Please refer to the [Deep Learning tutorial](https://clearlinux.org/documentation/clear-linux/tutorials/dlrs) for detailed instructions for running the TensorFlow and Kubeflow Benchmarks on the docker images. - -## Performance tuning configurations - -### Single Node Configuration - -| Key | Value | -| ----------------- | ------------- | -| num_inter_threads | Socket number | -| num_intra_threads | Physical cores number | -| data_format | NHWC for Eigen; NCHW for MKL as MKL is optimized for this format | - - -Example: For Intel® Xeon® Gold 6140 CPU @ 2.30GHz with 2 Sockets and 18 Cores/Socket MKL training with batch size 32: - -``` - python tf_cnn_benchmarks.py --device=cpu --mkl=True --nodistortions --model=resnet50 --data_format=NCHW --batch_size=32 --num_inter_threads=2 --num_intra_threads=36 --data_dir=/imagenet-TFrecord --data_name=imagenet -``` -### Multi Node Configuration -With Kubernetes + Tensorflow, a simple configuration would be: 1 master + 3 slave (master does not apply for real workloads execution) 1 parameter server + 2 worker (each deployed on a K8s slave) - -| Key | Value | -|----- | ------ | -| num_inter_threads | Socket number | -| num_intra_threads | Physical cores number (Reserve 2 cores per socket for IO operations) | -| data_format | NHWC for Eigen; NCHW for MKL as MKL is optimized for this format | - - -Example: For Intel® Xeon® Gold 6140 CPU @ 2.30GHz based systems with 2 Sockets and 18 Cores/Socket, 2-node distributed MKL dstraining with 1 worker per node and 1 Parameter Server (PS) can be specified and launched with this [TFJob](https://github.com/clearlinux/dockerfiles/blob/master/stacks/dlrs/kubeflow/dlrs-tfjob/dlrs-bench/prototypes/dlrs-resnet50.jsonnet) - -``` - PS: - args: [ - "python", - "tf_cnn_benchmarks.py", - "--mkl=True", - "--nodistortions", - "--batch_size=128", - "--model=resnet50", - "--num_inter_threads=2", - "--num_intra_threads=32", - "--variable_update=parameter_server", - "--local_parameter_device=cpu", - "--init_learning_rate=0.0001", - "--tf_random_seed=8286", - "--device=cpu", - "--data_format=NCHW", - "--data_dir=/imagenet/", - "--data_name=imagenet", - ] - - Worker: - args: [ - "python", - "tf_cnn_benchmarks.py", - "--mkl=True", - "--nodistortions", - "--batch_size=128", - "--model=resnet50", - "--num_inter_threads=2", - "--num_intra_threads=32", - "--variable_update=parameter_server", - "--local_parameter_device=cpu", - "--init_learning_rate=0.0001", - "--tf_random_seed=8286", - "--device=cpu", - "--data_format=NCHW", - "--data_dir=/imagenet/", - "--data_name=imagenet", - ] -``` - -For further notes on performance tuning use Tensorflow’s [official performance guide](https://www.tensorflow.org/guide/performance/overview) - - -# Contributing to the Deep Learning Reference Stack - -We encourage your contributions to this project, through the established Clear Linux community tools. Our team uses typical open source collaboration tools that are described on the Clear Linux [community page](https://clearlinux.org/community). - - - -# Reporting Security Issues - - If you have discovered potential security vulnerability in an Intel product, please contact the iPSIRT at secure@intel.com. - - It is important to include the following details: - - * The products and versions affected - * Detailed description of the vulnerability - * Information on known exploits - - Vulnerability information is extremely sensitive. The iPSIRT strongly recommends that all security vulnerability reports sent to Intel be encrypted using the iPSIRT PGP key. The PGP key is available here: https://www.intel.com/content/www/us/en/security-center/pgp-public-key.html - - Software to encrypt messages may be obtained from: - - * PGP Corporation - * GnuPG diff --git a/tensorflow-serving/Dockerfile b/tensorflow-serving/Dockerfile deleted file mode 100644 index feda86d..0000000 --- a/tensorflow-serving/Dockerfile +++ /dev/null @@ -1,54 +0,0 @@ -FROM clearlinux:latest AS builder - -ARG swupd_args -# Move to latest Clear Linux release to ensure -# that the swupd command line arguments are -# correct -RUN swupd update --no-boot-update $swupd_args - -# Grab os-release info from the minimal base image so -# that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / - -# Install additional content in a target directory -# using the os version from the minimal base -RUN source /os-release && \ - mkdir /install_root \ - && swupd os-install -V ${VERSION_ID} \ - --path /install_root --statedir /swupd-state \ - --bundles=os-core,tensorflow-serving --no-boot-update - -# For some Host OS configuration with redirect_dir on, -# extra data are saved on the upper layer when the same -# file exists on different layers. To minimize docker -# image size, remove the overlapped files before copy. -RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ -RUN cd / && \ - find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true - -FROM clearlinux/os-core:latest - -COPY --from=builder /install_root / - -# Expose ports -# gRPC -EXPOSE 8500 - -# REST -EXPOSE 8501 - -# Set where models should be stored in the container -ENV MODEL_BASE_PATH=/models -RUN mkdir -p ${MODEL_BASE_PATH} - -# The only required piece is the model name in order to differentiate endpoints -ENV MODEL_NAME=model - -# Copy the script that runs the model server so we can use environment variables -RUN mkdir -p /usr/local/bin -COPY tf_serving_entrypoint.sh /usr/local/bin/ -RUN chmod +x /usr/local/bin/tf_serving_entrypoint.sh - -ENTRYPOINT ["tf_serving_entrypoint.sh"] -CMD ["tensorflow_model_server"] diff --git a/tensorflow-serving/README.md b/tensorflow-serving/README.md deleted file mode 100644 index 396c303..0000000 --- a/tensorflow-serving/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# Clear Linux* OS `tensorflow-serving` container image - - -## What is this image? - -`clearlinux/tensorflow-serving` is a Docker image with `tensorflow-serving` running on top of the -[official clearlinux base image](https://hub.docker.com/_/clearlinux). - - -> [Tensorflow-serving](https://github.com/tensorflow/serving) is a flexible, -> high-performance serving system for machine learning models. - -For other Clear Linux* OS -based container images, see: https://hub.docker.com/u/clearlinux - -## Why use a clearlinux based image? - - -> [Clear Linux* OS](https://clearlinux.org/) is an open source, rolling release -> Linux distribution optimized for performance and security, from the Cloud to -> the Edge, designed for customization, and manageability. - -Clear Linux* OS based container images use: -* Optimized libraries that are compiled with latest compiler versions and - flags. -* Software packages that follow upstream source closely and update frequently. -* An aggressive security model and best practices for CVE patching. -* A multi-staged build approach to keep a reduced container image size. -* The same container syntax as the official images to make getting started - easy. - -To learn more about Clear Linux* OS, visit: https://clearlinux.org. - - -## Deployment: - -### Deploy with Docker -The easiest way to get started with this image is by simply pulling it from -Docker Hub. - -*Note: This container uses the same syntax as the [official tensorflow-serving image](https://hub.docker.com/r/tensorflow/serving). - - -1. Pull the image from Docker Hub: - ``` - docker pull clearlinux/tensorflow-serving - ``` - -2. Download a tensorflow-serving repo and setup the location of demo models - ``` - git clone https://github.com/tensorflow/serving - TESTDATA="$(pwd)/serving/tensorflow_serving/servables/tensorflow/testdata" - ``` - -3. Start a container using the examples below: - - ``` - docker run -t --rm -p 8501:8501 \ - -v "$TESTDATA/saved_model_half_plus_two_cpu:/models/half_plus_two" \ - -e MODEL_NAME=half_plus_two \ - clearlinux/tensorflow-serving & - ``` - -4. Query the model using the predict API and the return => { "predictions": [2.5, 3.0, 4.5] } - - ``` - curl -d '{"instances": [1.0, 2.0, 5.0]}' \ - -X POST http://localhost:8501/v1/models/half_plus_two:predict - ``` - -### Deploy with Kubernetes - -This image can also be deployed on a Kubernetes cluster, such as [minikube](https://kubernetes.io/docs/setup/learning-environment/minikube/).The following example YAML files are provided in the repository as reference for Kubernetes deployment: - -- [`tensorflow-serving-deployment.yaml`](https://github.com/clearlinux/dockerfiles/blob/master/tensorflow-serving/tensorflow-serving-deployment.yaml): example to create a basic tensorflow-serving service. - - - -Steps to deploy tensorflow-serving on a Kubernetes cluster: - -1. Download a tensorflow-serving repo. - - ``` - cd /var/tmp - git clone https://github.com/tensorflow/serving - ``` - -2. Deploy `tensorflow-serving-deployment.yaml` . - - ``` - kubectl create -f tensorflow-serving-deployment.yaml - ``` - -3. Query the model using the predict API and the return => { "predictions": [2.5, 3.0, 4.5] }, where 30001 is the port number defined in your service. - - ``` - curl -d '{"instances": [1.0, 2.0, 5.0]}' \ - -X POST http://:30001/v1/models/half_plus_two:predict - ``` - - - -## Build and modify: - -The Dockerfiles for all Clear Linux* OS based container images are available at -https://github.com/clearlinux/dockerfiles. These can be used to build and -modify the container images. - -1. Clone the clearlinux/dockerfiles repository. - ``` - git clone https://github.com/clearlinux/dockerfiles.git - ``` - -2. Change to the directory of the application: - ``` - cd tensorflow-serving/ - ``` - -3. Build the container image: - ``` - docker build -t clearlinux/tensorflow-serving . - ``` - - Refer to the Docker documentation for [default build arguments](https://docs.docker.com/engine/reference/builder/#arg). - Additionally: - - - `swupd_args` - specifies arguments to pass to the Clear Linux* OS software - manager. See the [swupd man pages](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) - for more information. - - -## Licenses - -All licenses for the Clear Linux* Project and distributed software can be found -at https://clearlinux.org/terms-and-policies diff --git a/tensorflow-serving/hooks/post_push b/tensorflow-serving/hooks/post_push deleted file mode 100755 index fbf3f1c..0000000 --- a/tensorflow-serving/hooks/post_push +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -. ../docker-hooks.sh - -image="clearlinux/tensorflow-serving" -package=tensorflow-serving - -do_tag $image $package diff --git a/tensorflow-serving/tensorflow-serving-deployment.yaml b/tensorflow-serving/tensorflow-serving-deployment.yaml deleted file mode 100644 index 175d6b9..0000000 --- a/tensorflow-serving/tensorflow-serving-deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: tf-serving-config -data: - MODEL_NAME: half_plus_two - ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: tf-serving -spec: - replicas: 1 - template: - metadata: - labels: - app: tf-serving - spec: - containers: - - name: tf-serving - image: docker.io/clearlinux/tensorflow-serving - ports: - - containerPort: 8501 - env: - - name: MODEL_NAME - valueFrom: - configMapKeyRef: - name: tf-serving-config - key: MODEL_NAME - volumeMounts: - - name: tf-serving-volume - mountPath: /models/half_plus_two - - volumes: - - name: tf-serving-volume - hostPath: - # /var/tmp is the root directory where you saved your models - path: /var/tmp/serving/tensorflow_serving/servables/tensorflow/testdata/saved_model_half_plus_two_cpu - type: Directory - ---- -apiVersion: v1 -kind: Service -metadata: - name: tf-serving -spec: - type: NodePort - ports: - - port: 8501 - targetPort: 8501 - nodePort: 30001 - selector: - app: tf-serving diff --git a/tensorflow-serving/tf_serving_entrypoint.sh b/tensorflow-serving/tf_serving_entrypoint.sh deleted file mode 100644 index 5fceac0..0000000 --- a/tensorflow-serving/tf_serving_entrypoint.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ "$1" = 'tensorflow_model_server' ]; then - exec tensorflow_model_server --port=8500 --rest_api_port=8501 \ - --model_name=${MODEL_NAME} --model_base_path=${MODEL_BASE_PATH}/${MODEL_NAME} -fi - -if [ "${1#-}" != "$1" ]; then - set -- tensorflow_model_server --port=8500 --rest_api_port=8501 \ - --model_name=${MODEL_NAME} --model_base_path=${MODEL_BASE_PATH}/${MODEL_NAME} "$@" -fi - -exec "$@" -~ - diff --git a/tensorflow/Dockerfile b/tensorflow/Dockerfile deleted file mode 100644 index 218bbbd..0000000 --- a/tensorflow/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -FROM clearlinux:latest AS builder - -ARG swupd_args -# Move to latest Clear Linux release to ensure -# that the swupd command line arguments are -# correct -RUN swupd update --no-boot-update $swupd_args - -# Grab os-release info from the minimal base image so -# that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / - -# Install additional content in a target directory -# using the os version from the minimal base -RUN source /os-release && \ - mkdir /install_root \ - && swupd os-install -V ${VERSION_ID} \ - --path /install_root --statedir /swupd-state \ - --bundles=os-core-update,machine-learning-tensorflow --no-boot-update - -# For some Host OS configuration with redirect_dir on, -# extra data are saved on the upper layer when the same -# file exists on different layers. To minimize docker -# image size, remove the overlapped files before copy. -RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ -RUN cd / && \ - find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true - - -FROM clearlinux/os-core:latest - -COPY --from=builder /install_root / diff --git a/tensorflow/README.md b/tensorflow/README.md deleted file mode 100644 index 9efd9c2..0000000 --- a/tensorflow/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# Clear Linux* OS `tensorflow` container image - - -## What is this image? - -`clearlinux/tensorflow` is a Docker image with `tensorflow` running on top of the -[official clearlinux base image](https://hub.docker.com/_/clearlinux). - - -> [Tensorflow](https://github.com/tensorflow/tensorflow) is an open-source machine learning library -> for research and production. - -For other Clear Linux* OS -based container images, see: https://hub.docker.com/u/clearlinux - -## Why use a clearlinux based image? - - -> [Clear Linux* OS](https://clearlinux.org/) is an open source, rolling release -> Linux distribution optimized for performance and security, from the Cloud to -> the Edge, designed for customization, and manageability. - -Clear Linux* OS based container images use: -* Optimized libraries that are compiled with latest compiler versions and - flags. -* Software packages that follow upstream source closely and update frequently. -* An aggressive security model and best practices for CVE patching. -* A multi-staged build approach to keep a reduced container image size. -* The same container syntax as the official images to make getting started - easy. - -To learn more about Clear Linux* OS, visit: https://clearlinux.org. - - -## Deployment: - -### Deploy with Docker -The easiest way to get started with this image is by simply pulling it from -Docker Hub. - -*Note: This container uses the same syntax as the [official tensorflow image](https://hub.docker.com/r/tensorflow/tensorflow). - - -1. Pull the image from Docker Hub: - ``` - docker pull clearlinux/tensorflow - ``` - -2. Start a container using the examples below: - - ``` - docker run -it --rm clearlinux/tensorflow bash - ``` - - -### Deploy with Kubernetes - - -## Build and modify: - -The Dockerfiles for all Clear Linux* OS based container images are available at -https://github.com/clearlinux/dockerfiles. These can be used to build and -modify the container images. - -1. Clone the clearlinux/dockerfiles repository. - ``` - git clone https://github.com/clearlinux/dockerfiles.git - ``` - -2. Change to the directory of the application: - ``` - cd tensorflow/ - ``` - -3. Build the container image: - ``` - docker build -t clearlinux/tensorflow . - ``` - - Refer to the Docker documentation for [default build arguments](https://docs.docker.com/engine/reference/builder/#arg). - Additionally: - - - `swupd_args` - specifies arguments to pass to the Clear Linux* OS software - manager. See the [swupd man pages](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) - for more information. - - -## Licenses - -All licenses for the Clear Linux* Project and distributed software can be found -at https://clearlinux.org/terms-and-policies diff --git a/tensorflow/hooks/post_push b/tensorflow/hooks/post_push deleted file mode 100755 index 4b4cac0..0000000 --- a/tensorflow/hooks/post_push +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -. ../docker-hooks.sh - -image="clearlinux/tensorflow" -package=tensorflow - -do_tag $image $package