-
Notifications
You must be signed in to change notification settings - Fork 142
refactor: docker directory structure #4306
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9590c6a
chore(docker): move runtime docker-compose into docker/run and update…
germa89 eae8a19
chore: adding changelog file 4306.miscellaneous.md [dependabot-skip]
pyansys-ci-bot 9e869b2
Merge branch 'main' into refactor/docker-directory
germa89 7b65e6b
Merge branch 'main' into refactor/docker-directory
germa89 43459a0
refactor: update README for Docker Compose usage and remove license s…
germa89 c2bf226
feat: add Dockerfile and .dockerignore for MAPDL container setup
germa89 45773bf
refactor: update make_container.rst to include README.rst for Docker …
germa89 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Docker directory structure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| .. _ref_make_container: | ||
|
|
||
| .. include:: ../../../docker/make_container.rst | ||
| .. include:: ../../../docker/build/README.rst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Docker Run Configurations | ||
|
|
||
| This directory contains Docker Compose files for running MAPDL, DPF, and license server containers. | ||
|
|
||
| ## Contents | ||
|
|
||
| - **`docker-compose.yml`**: Main Docker Compose configuration for running MAPDL and DPF services | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Running MAPDL with External License Server | ||
|
|
||
| ```bash | ||
| # Set required environment variables | ||
| export ANSYSLMD_LICENSE_FILE=1055@mylicenseserver | ||
| export DOCKER_IMAGE=myregistry.com/myimage:mytag | ||
| export DPF_DOCKER_IMAGE=myregistry.com/mydpfimage:mydpftag # optional | ||
|
|
||
| # Start MAPDL service | ||
| docker compose up -d mapdl | ||
|
|
||
| # Start MAPDL with DPF | ||
| docker compose up -d mapdl dpf | ||
|
|
||
| # Or use profiles | ||
| docker compose --profile mapdl-dpf up -d | ||
| ``` | ||
|
|
||
| ## Available Services | ||
|
|
||
| ### docker-compose.yml | ||
|
|
||
| - **`mapdl`**: MAPDL instance with gRPC server (ports 50052, 50055) | ||
| - **`dpf`**: DPF (Data Processing Framework) server (port 50056) | ||
| - **`mapdl-local`**: Development container with PyMAPDL workspace mounted | ||
|
|
||
| ## Available Profiles | ||
|
|
||
| - `mapdl` - Run MAPDL only | ||
| - `mapdl-dpf` - Run MAPDL with DPF | ||
| - `local` - Run MAPDL in local development mode | ||
| - `local-dpf` - Run MAPDL in local development mode with DPF | ||
| - `dpf` - Run DPF only | ||
|
|
||
| ## Environment Variables | ||
|
|
||
| - `ANSYSLMD_LICENSE_FILE`: License server location (e.g., `1055@mylicenseserver`) | ||
| - `DOCKER_IMAGE`: MAPDL Docker image path | ||
| - `DPF_DOCKER_IMAGE`: DPF Docker image path (optional) | ||
| - `AWP_ROOT`: Environment variable name for MAPDL installation (default: `AWP_ROOT251`) | ||
| - `AWP_ROOT_VALUE`: Path to MAPDL installation inside container (default: `/ansys_inc`) | ||
| - `DOCKER_USER`: Username inside the container (default: `mapdl`) | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Docker and Docker Compose installed | ||
| - MAPDL Docker image | ||
| - Valid Ansys license or access to a license server | ||
| - (Optional) DPF Docker image for data processing capabilities |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| # Docker Compose configuration for running Ansys MAPDL and DPF containers | ||
| # | ||
| # This file provides services for running MAPDL with an external license server. | ||
| # Connect to MAPDL through ports 50052 (gRPC) and 50055 (database feature). | ||
| # DPF server is available on port 50056. | ||
| # | ||
| # REQUIREMENTS | ||
| # ============ | ||
| # - Docker and Docker Compose | ||
| # - MAPDL Docker image | ||
| # - Access to an Ansys license server | ||
| # - (Optional) DPF Docker image | ||
| # | ||
| # REQUIRED ENVIRONMENT VARIABLES | ||
| # ============================== | ||
| # - ANSYSLMD_LICENSE_FILE: License server address (e.g., 1055@mylicenseserver) | ||
| # - DOCKER_IMAGE: Path to MAPDL Docker image | ||
| # - DPF_DOCKER_IMAGE: Path to DPF Docker image (optional, only if using DPF) | ||
| # | ||
| # OPTIONAL ENVIRONMENT VARIABLES | ||
| # ============================== | ||
| # - AWP_ROOT: MAPDL version environment variable name (default: AWP_ROOT251) | ||
| # - AWP_ROOT_VALUE: MAPDL installation path in container (default: /ansys_inc) | ||
| # - DOCKER_USER: Username inside container (default: mapdl) | ||
| # | ||
| # USAGE | ||
| # ===== | ||
| # 1. Set environment variables: | ||
| # export ANSYSLMD_LICENSE_FILE=1055@mylicenseserver | ||
| # export DOCKER_IMAGE=myregistry.com/myimage:mytag | ||
| # export DPF_DOCKER_IMAGE=myregistry.com/mydpfimage:mytag # optional | ||
| # | ||
| # 2. Start services: | ||
| # docker-compose up -d mapdl # MAPDL only | ||
| # docker-compose up -d mapdl dpf # MAPDL with DPF | ||
| # docker-compose --profile mapdl-dpf up -d # Using profile | ||
| # | ||
| # AVAILABLE SERVICES | ||
| # ================== | ||
| # - mapdl: MAPDL instance with gRPC server (ports 50052, 50055) | ||
| # - dpf: Data Processing Framework server (port 50056) | ||
| # - mapdl-local: MAPDL development container with PyMAPDL workspace mounted | ||
| # | ||
| # PROFILES | ||
| # ======== | ||
| # - mapdl: Start MAPDL service | ||
| # - mapdl-dpf: Start MAPDL and DPF services | ||
| # - local: Start MAPDL in development mode | ||
| # - local-dpf: Start MAPDL in development mode with DPF | ||
| # - dpf: Start DPF service only | ||
| # | ||
|
|
||
| name: pymapdl | ||
|
|
||
| services: | ||
| mapdl: | ||
| profiles: | ||
| - mapdl | ||
| - mapdl-dpf | ||
| restart: always | ||
| shm_size: '8gb' | ||
| container_name: mapdl | ||
| mem_reservation: 8g | ||
| environment: | ||
| - ANSYSLMD_LICENSE_FILE=${ANSYSLMD_LICENSE_FILE} | ||
| - ANSYS_LOCK=OFF | ||
| ports: | ||
| - '50052:50052' | ||
| - '50055:50055' | ||
| image: ${DOCKER_IMAGE} | ||
| platform: linux/amd64 | ||
germa89 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| dpf: | ||
| profiles: | ||
| - dpf | ||
| - mapdl-dpf | ||
| - local-dpf | ||
| image: ${DPF_DOCKER_IMAGE} | ||
| platform: linux/amd64 | ||
| ports: | ||
| - '50056:50052' | ||
| restart: always | ||
| environment: | ||
| - ANSYSLMD_LICENSE_FILE=${ANSYSLMD_LICENSE_FILE} | ||
|
|
||
| mapdl-local: | ||
| profiles: | ||
| - local | ||
| - local-dpf | ||
| restart: always | ||
| shm_size: '8gb' | ||
| container_name: mapdl-local | ||
| mem_reservation: 8g | ||
| environment: | ||
| - ANSYSLMD_LICENSE_FILE=${ANSYSLMD_LICENSE_FILE} | ||
| - ANSYS_LOCK=OFF | ||
| - ${AWP_ROOT:-AWP_ROOT251}=${AWP_ROOT_VALUE:-/ansys_inc} | ||
| # If also running the `mapdl` service, you need to set different ports | ||
| # to avoid conflicts. | ||
| ports: | ||
| - '50052:50052' | ||
| - '50055:50055' | ||
| platform: linux/amd64 | ||
| image: ${DOCKER_IMAGE} | ||
| # Mount the current directory to /home/${DOCKER_USER:-mapdl}/pymapdl | ||
| # This allows you to run the container and have access to the current directory | ||
| # from inside the container. | ||
| # This is useful for development purposes. | ||
| volumes: | ||
| - ../../:/home/${DOCKER_USER:-mapdl}/pymapdl:cached | ||
| working_dir: /home/${DOCKER_USER:-mapdl}/pymapdl | ||
| entrypoint: /bin/sh -c "echo 'Container is ready. You can now attach to it.'; while sleep 1000; do :; done" | ||
|
|
||
|
|
||
| networks: | ||
| default: | ||
| driver: bridge | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.