### Setup Python Virtual Environment Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/rhel8_x86_setup.md Creates and activates a Python 3.9 virtual environment, then upgrades pip and installs core data science libraries. ```bash python3.9 -m venv venv source ./venv/bin/activate python -m pip install --upgrade pip pip install torch numpy pandas ``` -------------------------------- ### Build and run SlideRule server (Ubuntu 20.04) Source: https://context7.com/slideruleearth/sliderule/llms.txt Install dependencies, build the SlideRule C++ server using CMake and Make, and install it. The server can be started with a Lua configuration script. ```bash # Install dependencies (Ubuntu 20.04) sudo apt install build-essential libreadline-dev liblua5.3-dev cmake # Build (using provided Makefile shortcuts) make config # runs cmake with default options make # compiles sudo make install # installs to /usr/local # Start the server with the slideruleearth target config sliderule targets/slideruleearth/server.lua # Or run as an interactive Lua interpreter sliderule # SlideRule> print(core.VERSION) # Run unit tests sliderule targets/slideruleearth/test_runner.lua # Advanced: build with specific packages enabled mkdir -p build cd build && cmake -DUSE_AWS_PACKAGE=ON -DUSE_GEO_PACKAGE=ON \ -DCMAKE_BUILD_TYPE=Release .. make && sudo make install ``` -------------------------------- ### Clone SlideRule Python Examples Repository Source: https://github.com/slideruleearth/sliderule/blob/main/clients/python/examples/first_request.ipynb Clone the SlideRule Python examples repository to get started. ```bash $ git clone https://github.com/SlideRuleEarth/sliderule-python.git ``` -------------------------------- ### Install Pre-commit Hooks Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Install `pip` if not already present, then navigate to the cloned repository, install `pre-commit`, and activate the hooks. ```bash sudo dnf install git cd sliderule pip install pre-commit pre-commit install pre-commit run --all-files ``` -------------------------------- ### Install JupyterLab Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/getting_started/Install.rst Install JupyterLab using Conda. This is a prerequisite for running the example notebooks. ```bash conda install -c conda-forge jupyterlab ``` -------------------------------- ### Install SlideRule from Source Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/getting_started/Install.rst Install the SlideRule Python client using setuptools after cloning the repository. Navigate to the client directory first. ```bash cd sliderule/clients/python pip install . ``` -------------------------------- ### Install Git Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Install the Git version control system using the DNF package manager. ```bash sudo dnf install git ``` -------------------------------- ### Start and Enable Docker Service Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Start the Docker service and configure it to launch automatically on system boot. ```bash sudo systemctl start docker sudo systemctl enable docker ``` -------------------------------- ### Download and Install Miniconda Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Download the Miniconda installer script for aarch64, make it executable, and run the installation. ```bash wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-aarch64.sh chmod +x Miniconda3-py39_4.12.0-Linux-aarch64.sh ./Miniconda3-py39_4.12.0-Linux-aarch64.sh ``` -------------------------------- ### AWS Credentials File Example Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Example structure for the `.aws/credentials` file, showing default and sliderule profile configurations. ```ini [default] aws_access_key_id = _ aws_secret_access_key = _ aws_session_token = _ [sliderule] aws_access_key_id = _ aws_secret_access_key = _ ``` -------------------------------- ### Install Twine Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/pub_to_pypi.md Before uploading, ensure you have the 'twine' package installed. Run this command in your Python environment if it's not already installed. ```bash pip install twine ``` -------------------------------- ### Install Platform Header Source: https://github.com/slideruleearth/sliderule/blob/main/CMakeLists.txt Installs the generated platform.h header file to the specified include directory during the installation process. ```cmake install (FILES ${CMAKE_CURRENT_BINARY_DIR}/auto/platform.h DESTINATION ${INCDIR}) ``` -------------------------------- ### Install NGINX Source: https://github.com/slideruleearth/sliderule/blob/main/clients/nodejs/README.md Installs the NGINX web server, commonly used for serving web applications. Use your system's package manager for installation. ```bash sudo apt install nginx ``` -------------------------------- ### Build and Install HDF5 Library (Standard) Source: https://github.com/slideruleearth/sliderule/blob/main/packages/hdf/README.md Clones the HDF5 repository, checks out a specific version, and builds it with production settings. Use this for a standard HDF5 installation. ```bash $ git clone https://github.com/HDFGroup/hdf5.git $ cd hdf5 $ git checkout 1.12/master $ mkdir build $ cd build $ CFLAGS=-fPIC ../configure --prefix=/usr/local --disable-shared --enable-build-mode=production $ make $ sudo make install ``` -------------------------------- ### Build and Install REST-VOL Plugin Source: https://github.com/slideruleearth/sliderule/blob/main/packages/hdf/README.md Builds and installs the REST-VOL plugin using CMake. Note that the build script may show failures, but `sudo make install` typically resolves installation issues. ```bash $ ./build_vol_cmake.sh -s -H /usr/local -P /usr/local $ cd rest_vol_cmake_build_files/ $ sudo make install ``` -------------------------------- ### Install SlideRule with PyPI Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/getting_started/Install.rst Alternative installation method for the SlideRule Python client using pip. ```bash pip install sliderule ``` -------------------------------- ### Install NVIDIA Drivers and Toolkit Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/rhel8_x86_setup.md Adds the NVIDIA CUDA repository, installs CUDA and cuDNN, and sets up the NVIDIA container toolkit. ```bash dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo dnf -y install cuda libcudnn8 libcudnn8-devel distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | sudo tee /etc/yum.repos.d/nvidia-docker.repo sudo yum install -y nvidia-container-toolkit sudo systemctl restart docker ``` -------------------------------- ### Install Git Large File System Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/rhel8_x86_setup.md Installs wget, downloads the git-lfs RPM package, installs it using rpm, and then initializes git lfs. ```bash sudo dnf install wget wget --content-disposition "https://packagecloud.io/github/git-lfs/packages/el/8/git-lfs-3.5.1-1.el8.x86_64.rpm/download.rpm?distro_version_id=205" sudo rpm -i git-lfs-3.5.1-1.el8.x86_64.rpm git lfs install ``` -------------------------------- ### Install GitHub CLI Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Add the GitHub CLI repository and install the `gh` command-line tool using DNF. ```bash sudo dnf install 'dnf-command(config-manager)' sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo sudo dnf install gh ``` -------------------------------- ### Install Bluetopo Headers Source: https://github.com/slideruleearth/sliderule/blob/main/datasets/bluetopo/CMakeLists.txt Installs the header files for the bluetopo dataset to the specified installation directory, making them available for external use. ```cmake install ( FILES ${CMAKE_CURRENT_LIST_DIR}/package/bluetopo.h ${CMAKE_CURRENT_LIST_DIR}/package/BlueTopoBathyRaster.h DESTINATION ${INCDIR} ) ``` -------------------------------- ### Start SlideRule Server Source: https://github.com/slideruleearth/sliderule/blob/main/README.md Starts a SlideRule server instance with a specified Lua script for configuration. Ensure the Lua script path is correct. ```bash $ sliderule targets/slideruleearth/server.lua ``` -------------------------------- ### Install Jest for Development Source: https://github.com/slideruleearth/sliderule/blob/main/clients/nodejs/README.md Installs Jest as a development dependency for testing. Refer to Jest's documentation for the most up-to-date installation instructions. ```bash npm install --save-dev jest ``` -------------------------------- ### Install Sliderule Executable Source: https://github.com/slideruleearth/sliderule/blob/main/applications/server/CMakeLists.txt Installs the 'sliderule' executable to the specified installation directory's bin folder. This makes the executable available after the build and installation process. ```cmake install (TARGETS sliderule DESTINATION ${INSTALLDIR}/bin) ``` -------------------------------- ### Install OpenData Header Files Source: https://github.com/slideruleearth/sliderule/blob/main/datasets/opendata/CMakeLists.txt Installs the header files associated with the opendata dataset to the specified installation directory. This ensures that the necessary header files are available when the library is installed. ```cmake install ( FILES ${CMAKE_CURRENT_LIST_DIR}/package/opendata.h ${CMAKE_CURRENT_LIST_DIR}/package/EsaWorldCover10meterRaster.h ${CMAKE_CURRENT_LIST_DIR}/package/EsaCopernicus30meterRaster.h ${CMAKE_CURRENT_LIST_DIR}/package/MetaGlobalCanopy1meterRaster.h DESTINATION ${INCDIR} ) ``` -------------------------------- ### Install Build Tools for Ubuntu Source: https://github.com/slideruleearth/sliderule/blob/main/README.md Installs essential build tools and Lua development libraries for Ubuntu. Ensure you have these prerequisites before building. ```bash sudo apt install build-essential libreadline-dev liblua5.3-dev ``` -------------------------------- ### CMake Installation Directory Option Source: https://github.com/slideruleearth/sliderule/blob/main/README.md Sets the installation prefix for SlideRule. Use this to specify a custom location for installed binaries and headers. ```bash -DINSTALLDIR=[prefix] ``` -------------------------------- ### Install Landsat Header Files Source: https://github.com/slideruleearth/sliderule/blob/main/datasets/landsat/CMakeLists.txt Installs the Landsat and LandsatHlsRaster header files to the specified installation directory (${INCDIR}). ```cmake install ( FILES ${CMAKE_CURRENT_LIST_DIR}/package/landsat.h ${CMAKE_CURRENT_LIST_DIR}/package/LandsatHlsRaster.h DESTINATION ${INCDIR} ) ``` -------------------------------- ### Install and Configure Docker Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Install Docker, add the current user to the `docker` group, and restart the shell session for changes to take effect. This allows running Docker commands without `sudo`. ```bash sudo dnf install docker curl sudo usermod -aG docker newgrp docker ``` -------------------------------- ### Install AWS CLI Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Install the AWS Command Line Interface using the DNF package manager. ```bash sudo dnf install awscli ``` -------------------------------- ### Install Library and Version File Source: https://github.com/slideruleearth/sliderule/blob/main/CMakeLists.txt Installs the compiled slideruleLib target and the version.txt file to their respective destinations during the build process. ```cmake install (TARGETS slideruleLib DESTINATION ${INSTALLDIR}/lib) ``` ```cmake install (FILES ${CMAKE_CURRENT_LIST_DIR}/version.txt DESTINATION ${CONFDIR}) ``` -------------------------------- ### Install Build Requirements Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/rhel8_x86_setup.md Installs essential development tools and libraries for building projects on RHEL8. ```bash sudo dnf groupinstall "Development Tools" sudo dnf install \ cmake \ cppcheck \ opencv-devel \ python3.9 \ parallel \ gmp-devel \ mlpack-devel \ mlpack-bin \ gdal-devel \ armadillo-devel \ gcc-toolset-12 ``` -------------------------------- ### Install Arrow Library on Ubuntu Source: https://github.com/slideruleearth/sliderule/blob/main/packages/arrow/README.md Installs the Arrow library and Parquet development files on Ubuntu 22.04 using apt. Ensure you have the latest package lists before installation. ```bash sudo apt update sudo apt install -y ca-certificates lsb-release wget wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb sudo apt install -y ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb sudo apt update sudo apt install -y libarrow-dev sudo apt install -y libparquet-dev ``` -------------------------------- ### Create Conda Environment from File Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/getting_started/Install.rst Create a conda environment with SlideRule and its example dependencies using an environment file. ```bash conda env create -f environment.yml ``` -------------------------------- ### Install Certbot and DNS Plugin on Ubuntu Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/certbot_instructions.md Installs Certbot and the Route53 DNS plugin on an Ubuntu system using snap. Ensure the classic certbot snap is linked to /usr/bin/certbot. ```bash sudo snap install core; sudo snap refresh core sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/bin/certbot sudo snap set certbot trust-plugin-with-root=ok sudo snap install certbot-dns-route53 ``` -------------------------------- ### Install libcurl Development Files Source: https://github.com/slideruleearth/sliderule/blob/main/packages/hdf/README.md Installs the development files for the libcurl library, a dependency for the REST-VOL plugin. This command is for Debian-based systems. ```bash $ sudo apt install libcurl4-openssl-dev ``` -------------------------------- ### Install cURL Library on Ubuntu Source: https://github.com/slideruleearth/sliderule/blob/main/packages/aws/README.md Installs the cURL library and its development headers on Ubuntu 22.04. Ensure the installation supports SSL and TLS by checking with `curl-config --feature`. ```bash $ sudo apt install curl libcurl4-openssl-dev ``` -------------------------------- ### Install AWS CLI Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/aws_cli_tips.md Use this command to install the AWS CLI on Debian-based systems. ```bash $ sudo apt install awscli ``` -------------------------------- ### Install Static Analysis Tools Source: https://github.com/slideruleearth/sliderule/blob/main/README.md Installs Clang, Clang-Tidy, and Cppcheck for static code analysis. These are recommended for debug builds. ```bash sudo apt install clang clang-tidy cppcheck ``` -------------------------------- ### Setup .netrc for Earthdata Login Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/accessing_earthdata_cloud.md Configure your .netrc file with your Earthdata Login credentials for authentication. Ensure the file has restricted permissions. ```bash echo 'machine urs.earthdata.nasa.gov login {uid} password {password}' >> ~/.netrc chmod 0600 ~/.netrc ``` -------------------------------- ### Install Build Tools for CentOS Source: https://github.com/slideruleearth/sliderule/blob/main/README.md Installs development tools, readline, and compiles Lua from source for CentOS. This ensures the correct Lua version is available. ```bash sudo yum group install "Development Tools" sudo yum install readline readline-devel wget http://www.lua.org/ftp/lua-5.3.6.tar.gz tar -xvzf lua-5.3.6.tar.gz cd lua-5.3.6 make linux sudo make install ``` -------------------------------- ### Install Docker Compose Plugin Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Download and install the Docker Compose plugin for managing multi-container Docker applications. Ensure the plugin is executable. ```bash DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} mkdir -p $DOCKER_CONFIG/cli-plugins curl -SL https://github.com/docker/compose/releases/download/v2.23.3/docker-compose-linux-aarch64 -o $DOCKER_CONFIG/cli-plugins/docker-compose chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose ``` -------------------------------- ### Install zlib Development Files Source: https://github.com/slideruleearth/sliderule/blob/main/packages/hdf/README.md Ensure zlib is installed, which is a dependency for HDF5. This command is for Debian-based systems. ```bash $ sudo apt install zlib1g-dev ``` -------------------------------- ### Standard SlideRule Build Process Source: https://github.com/slideruleearth/sliderule/blob/main/README.md Builds and installs SlideRule using CMake. This is the standard procedure for compiling the framework. ```bash make config make sudo make install ``` -------------------------------- ### Install Jest Globally Source: https://github.com/slideruleearth/sliderule/blob/main/clients/nodejs/README.md Installs Jest globally on the system, making it accessible from any project. Check Jest's official documentation for current practices. ```bash npm install jest --global ``` -------------------------------- ### Get SlideRule Python Client Version Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/user_guide/versioning.md Use this snippet to retrieve the version of the installed SlideRule Python client. Ensure the 'sliderule' library is installed. ```python from sliderule import version version.version ``` -------------------------------- ### Cluster Not Started Error Message Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/articles/private_clusters.md Example message indicating a private cluster has shut down due to reaching its time-to-live and requires restarting. ```text Connection error to endpoint https://{cluster}.slideruleearth.io/source/version ...retrying request ``` -------------------------------- ### Create and Configure New User Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Create a new user, set a password, add them to the wheel group for sudo privileges, and switch to the new user. ```bash sudo useradd -m -s /usr/bin/bash sudo passwd sudo usermod -aG wheel su - ``` -------------------------------- ### Get Record Definition (Python) Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/endpoints.rst Python example for requesting a record definition. Ensure the 'sliderule' library is imported. The 'stream=False' argument indicates a single response. ```python # Request Record Definition rsps = sliderule.source("definition", {"rectype": "atl03rec"}, stream=False) ``` -------------------------------- ### Install HDF Package Headers Source: https://github.com/slideruleearth/sliderule/blob/main/packages/hdf/CMakeLists.txt Installs the HDF package header files to the specified installation directory. This ensures that users of the installed library can access the necessary header files. ```cmake install ( FILES ${CMAKE_CURRENT_LIST_DIR}/package/hdf.h ${CMAKE_CURRENT_LIST_DIR}/package/HdfLib.h DESTINATION ${INCDIR} ) ``` -------------------------------- ### AWS SSO Initial Setup Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Run these commands once to configure your machine for AWS SSO. Replace `` with your desired AWS profile name. ```bash aws configure sso --profile --use-device-code ``` -------------------------------- ### Install zlib for H5Coro Source: https://github.com/slideruleearth/sliderule/blob/main/packages/h5coro/README.md Ensure zlib is installed on your system before proceeding with H5Coro installation. This is a system-level dependency. ```bash sudo apt install zlib1g-dev ``` -------------------------------- ### Initial Login and System Update Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/amazon_linux_arm_setup.md Connect to your AWS instance via SSH and update the system's packages. ```bash ssh -i .ssh/.pem ec2-user@ sudo dnf upgrade --refresh ``` -------------------------------- ### Install Yet Another JSON Library (YAJL) Source: https://github.com/slideruleearth/sliderule/blob/main/packages/hdf/README.md Downloads and installs YAJL, a JSON parsing library required by the REST-VOL connector. Ensure version 2.1 or later is installed. ```bash $ git clone https://github.com/lloyd/yajl.git $ cd yajl $ ./configure $ make $ sudo make install ``` -------------------------------- ### Upload Package to PyPI Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/how_tos/pub_to_pypi.md Use 'twine upload' to publish the built distribution to PyPI. This command should be run from the same directory as 'setup.py'. Note that uploading a version that already exists will fail. ```bash twine upload dist/* ``` -------------------------------- ### Configure SlideRule Client Source: https://github.com/slideruleearth/sliderule/blob/main/clients/python/examples/atl06p_request.ipynb Initializes the SlideRule client with verbose logging enabled. ```python # configure the client to output verbose log messages sliderule.init(verbose=True) ``` -------------------------------- ### Initialize SlideRule Python Client Session Source: https://context7.com/slideruleearth/sliderule/llms.txt Sets up the global session, configures the target cluster, optionally scales the cluster, and verifies client/server version compatibility. Must be called before any processing APIs. Use `rethrow=False` to suppress exceptions and log them instead. ```python import sliderule # Connect to the public SlideRule cluster sliderule.init( url="slideruleearth.io", verbose=True, # prints logs to stdout organization="sliderule", # cluster name (public default) desired_nodes=4, # request 4 nodes time_to_live=120, # keep nodes for 120 minutes plugins=["icesat2"], # verify icesat2 plugin is present rethrow=False # suppress exceptions, log instead ) # True returned when server and client versions are compatible ``` -------------------------------- ### Install GDAL on Ubuntu 20.04 Source: https://github.com/slideruleearth/sliderule/blob/main/packages/geo/README.md Installs the GDAL development library and its dependencies on Ubuntu 20.04. Ensure you have the necessary permissions. ```bash $ sudo apt install libgdal-dev libuuid-dev libtiff-dev \ ``` -------------------------------- ### Update SlideRule Python Client (Developer Install) Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/release_notes/release-v01-04-00.md Follow these steps to update the SlideRule Python client for developer installs. ```bash $ cd sliderule-python $ git checkout main $ git pull $ python3 setup.py install ``` -------------------------------- ### Create and Activate Conda Environment Source: https://github.com/slideruleearth/sliderule/blob/main/clients/python/examples/first_request.ipynb Create a conda environment with necessary dependencies and activate it. ```bash cd sliderule-python conda env create -f environment.yml conda activate sliderule_env ``` -------------------------------- ### Install SlideRule Python Client Source: https://github.com/slideruleearth/sliderule/blob/main/clients/python/README.md Install the SlideRule Python client using conda. Ensure you have conda-forge channel configured. ```bash conda install -c conda-forge sliderule ``` -------------------------------- ### Configuration JSON File Removal Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/release_notes/release-v05-00-00.md In v5.0.3, the configuration JSON file was removed, and all startup parameters are now managed via environment variables. ```text Removed the configuration json file and made all startup parameters environment variables. ``` -------------------------------- ### Initialize SlideRule Client with PAT Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/articles/private_clusters.md Initialize the SlideRule Python client globally with a GitHub Personal Access Token (PAT). This sets up authentication for subsequent operations. ```python import sliderule sliderule.init(github_token="") ``` -------------------------------- ### HTTP 200 OK Response Example Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/endpoints.rst Example of a successful HTTP response from a sliderule endpoint, showing populated data fields. ```http HTTP/1.1 200 OK Server: sliderule/0.5.0 Content-Type: text/plain Content-Length: 76 {"y":1.1371580426033,"x":-0.20051164424058,"lat":29.999999999998,"lon":-100} ``` -------------------------------- ### Node.js client: Initialize and run ATL06 processing Source: https://context7.com/slideruleearth/sliderule/llms.txt Initialize the Node.js client with GitHub PAT authentication and run ATL06 processing using the icesat2 module. Requires SLIDERULE_GITHUB_TOKEN environment variable. ```javascript const core = require('@sliderule/sliderule'); const icesat2 = require('@sliderule/sliderule/icesat2'); (async () => { // Initialize with GitHub PAT authentication await core.init({ domain: "slideruleearth.io", organization: "sliderule", verbose: true, github_token: process.env.SLIDERULE_GITHUB_TOKEN, }); // Check version const ver = await core.get_version(); console.log("Server version:", ver.server.version); // Run ATL06 processing (Node.js icesat2 module) const parms = { cnf: 4, ats: 20.0, cnt: 10, len: 40.0, res: 20.0, }; const resources = ["ATL03_20181019065445_03150111_003_01.h5"]; const elevations = await icesat2.atl06p(parms, resources); console.log(`Received ${elevations.length} elevation records`); // Each record: { delta_time, lat, lon, h_mean, dh_fit_dx, ... } })(); ``` -------------------------------- ### POST /source/h5 HTTP Request Example Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/endpoints.rst Example HTTP request payload for reading a dataset from an HDF5 file using the /source/h5 endpoint. ```http POST /source/h5 HTTP/1.1 Host: my-sliderule-server:9081 Content-Length: 189 {"asset": "atlas-local", "resource": "ATL03_20181019065445_03150111_003_01.h5", "dataset": "/gt1r/geolocation/segment_ph_cnt", "datatype": 2, "col": 0, "startrow": 0, "numrows": 5, "id": 0} ``` -------------------------------- ### Create Sliderule Session Source: https://github.com/slideruleearth/sliderule/blob/main/clients/python/examples/atl09_atmo_sampler.ipynb Establishes a connection to the sliderule service. Set verbose=True for detailed output. ```python session = sliderule.create_session(verbose=True) ``` -------------------------------- ### Sample from Supported Dataset Source: https://github.com/slideruleearth/sliderule/blob/main/clients/python/examples/user_url_raster.ipynb Samples data from the built-in 'esa-copernicus-30meter' dataset. This uses GDAL's /vsis3/ driver and applies CRS handling overrides for vertical adjustment. ```python dataset_val, dataset_file = sample_one("esa-copernicus-30meter") print(f" value={dataset_val:.2f}") print(f" file={dataset_file}") ``` -------------------------------- ### Install Node.js 20.x on Ubuntu Source: https://github.com/slideruleearth/sliderule/blob/main/clients/nodejs/README.md Installs Node.js version 20.x using NodeSource distributions on Ubuntu. Ensure you follow the latest instructions from NodeSource. ```bash curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&\ sudo apt-get install -y nodejs ``` -------------------------------- ### Start Local Docker Compose Services Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/release_deploy.md Start the 'ilb' and 'ams' containers in detached mode for local testing. This command is run from the sliderule/targets/slideruleearth directory. ```bash docker compose up ilb ams -d ``` -------------------------------- ### Specify atl08_fields for atl08x Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/user_guide/icesat2.md Example of how to specify additional fields to retrieve from ATL08 granules using the 'atl08_fields' parameter. This example requests the 'asr' field. ```python parms = { "atl08_fields": ["asr"], } GDF = sliderule.run("atl08x", parms) ``` -------------------------------- ### Create SlideRule Session with PAT Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/articles/private_clusters.md Initialize a SlideRule session using a provided GitHub Personal Access Token (PAT). Ensure the PAT has the necessary permissions. ```python import sliderule session = sliderule.create_session(cluster="", github_token="") ``` -------------------------------- ### Initialize Client with Organization Source: https://github.com/slideruleearth/sliderule/blob/main/docs/rtd/source/developer_guide/release_notes/release-v02-00-00.md Modify Python scripts to include the organization when initializing the client for private clusters. ```python icesat2.init("slideruleearth.io", organization="{your_organization}") ```