Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update STK Parallel Computing version stamp #254

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ Note: Since STK Parallel Computing Server consists of multiple containers runnin
* Copy the `STK_Parallel_Computing_Coordinator${version}.tgz` from the `Linux` folder to the [`coordinator/distributions`](./coordinator/distributions/) folder.
* Copy the `STK_Parallel_Computing_Agent${version}.tgz` from the `Linux` folder to the [`agent/distributions`](./agent/distributions/) folder.
3. Build the coordinator image:
* If you did not build the `custom-environment` image described in the [Special Configuration](#special-configuration) section, run `docker build -t ansys/stk/stk-parallel-computing-server-coordinator:{version}-ubi-8 coordinator` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`
* If you did build the `custom-environment` image described in the [Special Configuration](#special-configuration) section, run `docker build -t ansys/stk/stk-parallel-computing-server-coordinator:{version}-ubi-8 --build-arg baseImage=custom/redhat/ubi8:latest coordinator` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`
4. Run `docker build -t ansys/stk/stk-parallel-computing-server-python:{version}-ubi-8 python` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`. This produces an image that includes the STK Parallel Computing Server Python API. The Agent container extends from this, but it can also be used to execute a client script that submits jobs to the Coordinator service.
5. Run `docker build -t ansys/stk/stk-parallel-computing-server-agent:{version}-ubi-8 agent` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0` to build the agent image.
* If you did not build the `custom-environment` image described in the [Special Configuration](#special-configuration) section, run `docker build -t ansys/stk/stk-parallel-computing-server-coordinator:{version}-ubi-8 coordinator` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`
* If you did build the `custom-environment` image described in the [Special Configuration](#special-configuration) section, run `docker build -t ansys/stk/stk-parallel-computing-server-coordinator:{version}-ubi-8 --build-arg baseImage=custom/redhat/ubi8:latest coordinator` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`
4. Run `docker build -t ansys/stk/stk-parallel-computing-server-python:{version}-ubi-8 python` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`. This produces an image that includes the STK Parallel Computing Server Python API. The Agent container extends from this, but it can also be used to execute a client script that submits jobs to the Coordinator service.
5. Run `docker build -t ansys/stk/stk-parallel-computing-server-agent:{version}-ubi-8 agent` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0` to build the agent image.

### Run the Containers

Expand All @@ -40,18 +40,18 @@ Note: Since STK Parallel Computing Server consists of multiple containers runnin
The entrypoint of these containers start the Coordinator and Agent servers, with the Coordinator listening on the container's port `9090`. To start the containers:

1. Run `docker network create stk-parallel-computing-server` on the command line in this directory.
2. Run `docker run -d --rm --name stk-parallel-coordinator --network stk-parallel-computing-server --network-alias coordinator -p 9090:9090 ansys/stk/stk-parallel-computing-server-coordinator:{version}-ubi-8` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`
2. Run `docker run -d --rm --name stk-parallel-coordinator --network stk-parallel-computing-server --network-alias coordinator -p 9090:9090 ansys/stk/stk-parallel-computing-server-coordinator:{version}-ubi-8` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`
* If port `9090` is already in use on your machine, map a different port (e.g. `1234:9090`).
3. Run `docker run -d --rm --name stk-parallel-agent --network stk-parallel-computing-server --network-alias agent --env-file ../configuration/licensing.env -e COORDINATOR=coordinator ansys/stk/stk-parallel-computing-server-agent:{version}-ubi-8`
on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`
on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`

#### Execute Parallel Computing Tasks

This section will show how to execute the [`client_example.py`](./client_example.py) script using a Docker container with Python 3 and the STK Parallel Computing Server Python API installed.

In this example, each task will compute access intervals between a default satellite object and a default place object given the start and stop times of the analysis interval. Each task's interval is defined as an entry in the `timeIntervals` list. You can edit this list directly in the script file to add more calculation intervals or modify those already there. The date-times must be in valid ISO-8601 format.

1. Run `docker run --rm -v <ABSOLUTE PATH TO THIS DIRECTORY>/client_example.py:/tmp/client_example.py -e COORDINATOR_HOSTNAME=coordinator -e COORDINATOR_PORT=9090 -w /tmp --network stk-parallel-computing-server ansys/stk/stk-parallel-computing-server-python:{version}-ubi-8 client_example.py` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`
1. Run `docker run --rm -v <ABSOLUTE PATH TO THIS DIRECTORY>/client_example.py:/tmp/client_example.py -e COORDINATOR_HOSTNAME=coordinator -e COORDINATOR_PORT=9090 -w /tmp --network stk-parallel-computing-server ansys/stk/stk-parallel-computing-server-python:{version}-ubi-8 client_example.py` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`
* If you changed the host port mapping for the coordinator above, use that port for the value of `COORDINATOR_PORT`
instead of `9090`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG baseImage=ansys/stk/stk-parallel-computing-server-python:2.8.0-ubi8
ARG baseImage=ansys/stk/stk-parallel-computing-server-python:2.9.0-ubi8
FROM ${baseImage} AS builder

# Add the STK Parallel Computing Server Agent packages to the builder stage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.7'
services:
python:
image: ansys/stk/stk-parallel-computing-server-python:2.8.0-ubi8
image: ansys/stk/stk-parallel-computing-server-python:2.9.0-ubi8
build:
context: ./python
args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
version: '3.7'
services:
agent:
image: ansys/stk/stk-parallel-computing-server-agent:2.8.0-ubi8
image: ansys/stk/stk-parallel-computing-server-agent:2.9.0-ubi8
build:
context: ./agent
args:
baseImage: ansys/stk/stk-parallel-computing-server-python:2.8.0-ubi8
baseImage: ansys/stk/stk-parallel-computing-server-python:2.9.0-ubi8
env_file: ../configuration/licensing.env
environment:
- COORDINATOR=coordinator
networks:
- stk-parallel-computing-server
coordinator:
image: ansys/stk/stk-parallel-computing-server-coordinator:2.8.0-ubi8
image: ansys/stk/stk-parallel-computing-server-coordinator:2.9.0-ubi8
build:
context: ./coordinator
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Note: Since STK Parallel Computing Server consists of multiple containers runnin
* Copy the `Server\Agent\v{version}` folder from the installation media to the [`agent\distributions`](./agent/distributions/) folder.
* Copy the `dotnet-runtime*.exe` file from the Prerequirements\DotNet.Core folder to the [`agent\distributions`](./agent/distributions/) AND the [`coordinator\distributions`](./coordinator/distributions/) folders.
3. Build the coordinator image:
Run `docker build --build-arg agreeToLicense=yes -t ansys/stk/stk-parallel-computing-server-coordinator:{version}-windowsservercore-ltsc2019 coordinator` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`. Supplying the agreeToLicense build argument indicates your acceptance of the STK End User License Agreement.
4. Run `docker build -t ansys/stk/stk-parallel-computing-server-python:{version}-windowsservercore-ltsc2019 python` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`. This produces an image that includes the STK Parallel Computing Server Python API. The Agent container extends from this, but it can also be used to execute a client script that submits jobs to the Coordinator service.
5. Run `docker build --build-arg agreeToLicense=yes -t ansys/stk/stk-parallel-computing-server-agent:{version}-windowsservercore-ltsc2019 agent` on the command line in this directory to build the agent image after replacing `{version}` with the version number. i.e `2.8.0`. Supplying the agreeToLicense build argument indicates your acceptance of the STK End User License Agreement.
Run `docker build --build-arg agreeToLicense=yes -t ansys/stk/stk-parallel-computing-server-coordinator:{version}-windowsservercore-ltsc2019 coordinator` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`. Supplying the agreeToLicense build argument indicates your acceptance of the STK End User License Agreement.
4. Run `docker build -t ansys/stk/stk-parallel-computing-server-python:{version}-windowsservercore-ltsc2019 python` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`. This produces an image that includes the STK Parallel Computing Server Python API. The Agent container extends from this, but it can also be used to execute a client script that submits jobs to the Coordinator service.
5. Run `docker build --build-arg agreeToLicense=yes -t ansys/stk/stk-parallel-computing-server-agent:{version}-windowsservercore-ltsc2019 agent` on the command line in this directory to build the agent image after replacing `{version}` with the version number. i.e `2.9.0`. Supplying the agreeToLicense build argument indicates your acceptance of the STK End User License Agreement.

### Run the Containers

Expand All @@ -43,17 +43,17 @@ Note: Since STK Parallel Computing Server consists of multiple containers runnin
The entrypoint of these containers start the Coordinator and Agent servers, with the Coordinator listening on the container's port `9090`. To start the containers:

1. Run `docker network create stk-parallel-computing-server` on the command line in this directory.
2. Run `docker run -d --rm --name stk-parallel-coordinator --network stk-parallel-computing-server --network-alias coordinator -p 9090:9090 ansys/stk/stk-parallel-computing-server-coordinator:{version}-windowsservercore-ltsc2019` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`
2. Run `docker run -d --rm --name stk-parallel-coordinator --network stk-parallel-computing-server --network-alias coordinator -p 9090:9090 ansys/stk/stk-parallel-computing-server-coordinator:{version}-windowsservercore-ltsc2019` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`
* If port `9090` is already in use on your machine, map a different port (e.g. `1234:9090`).
3. Run `docker run -d --rm --name stk-parallel-agent --network stk-parallel-computing-server --network-alias agent --env-file ..\configuration\licensing.env -e COORDINATOR=coordinator ansys/stk/stk-parallel-computing-server-agent:{version}-windowsservercore-ltsc2019` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`
3. Run `docker run -d --rm --name stk-parallel-agent --network stk-parallel-computing-server --network-alias agent --env-file ..\configuration\licensing.env -e COORDINATOR=coordinator ansys/stk/stk-parallel-computing-server-agent:{version}-windowsservercore-ltsc2019` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`

#### Execute Parallel Computing Tasks

This section will show how to execute the [`client_example.py`](./client_example.py) script using a Docker container with Python 3 and the STK Parallel Computing Server Python API installed.

In this example, each task will compute access intervals between a default satellite object and a default place object given the start and stop times of the analysis interval. Each task's interval is defined as an entry in the `timeIntervals` list. You can edit this list directly in the script file to add more calculation intervals or modify those already there. The date-times must be in valid ISO-8601 format.

1. Run `docker run --rm -v <ABSOLUTE PATH TO THIS DIRECTORY>\:C:\test\ -e COORDINATOR_HOSTNAME=coordinator -e COORDINATOR_PORT=9090 -w C:\test --network stk-parallel-computing-server ansys/stk/stk-parallel-computing-server-python:{version}-windowsservercore-ltsc2019 client_example.py` on the command line in this directory after replacing `{version}` with the version number. i.e `2.8.0`
1. Run `docker run --rm -v <ABSOLUTE PATH TO THIS DIRECTORY>\:C:\test\ -e COORDINATOR_HOSTNAME=coordinator -e COORDINATOR_PORT=9090 -w C:\test --network stk-parallel-computing-server ansys/stk/stk-parallel-computing-server-python:{version}-windowsservercore-ltsc2019 client_example.py` on the command line in this directory after replacing `{version}` with the version number. i.e `2.9.0`
* If you changed the host port mapping for the coordinator above, use that port for the value of `COORDINATOR_PORT` instead of `9090`.

#### Cleanup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.7'
services:
python:
image: ansys/stk/stk-parallel-computing-server-python:2.8.0-windowsservercore-ltsc2019
image: ansys/stk/stk-parallel-computing-server-python:2.9.0-windowsservercore-ltsc2019
build:
context: ./python
args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
version: '3.7'
services:
agent:
image: ansys/stk/stk-parallel-computing-server-agent:2.8.0-windowsservercore-ltsc2019
image: ansys/stk/stk-parallel-computing-server-agent:2.9.0-windowsservercore-ltsc2019
build:
context: ./agent
args:
agentBaseImage: ansys/stk/stk-parallel-computing-server-python:2.8.0-windowsservercore-ltsc2019
agentBaseImage: ansys/stk/stk-parallel-computing-server-python:2.9.0-windowsservercore-ltsc2019
env_file: ../configuration/licensing.env
environment:
- COORDINATOR=coordinator
networks:
- stk-parallel-computing-server
coordinator:
image: ansys/stk/stk-parallel-computing-server-coordinator:2.8.0-windowsservercore-ltsc2019
image: ansys/stk/stk-parallel-computing-server-coordinator:2.9.0-windowsservercore-ltsc2019
build:
context: ./coordinator
args:
Expand Down