Skip to content
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
1 change: 1 addition & 0 deletions doc/changelog.d/4306.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Docker directory structure
2 changes: 1 addition & 1 deletion doc/source/getting_started/make_container.rst
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
2 changes: 1 addition & 1 deletion doc/source/links.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
.. _pymapdl_techdemo_28_rst: https://raw.githubusercontent.com/ansys/pymapdl-examples/main/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst
.. _pymapdl_techdemo_28: https://examples.mapdl.docs.pyansys.com/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.html
.. _pymapdl_docker_dir: https://github.com/ansys/pymapdl/blob/main/docker
.. _pymapdl_docker_compose_base: https://github.com/ansys/pymapdl/blob/main/docker/docker-compose.yml
.. _pymapdl_docker_compose_base: https://github.com/ansys/pymapdl/blob/main/docker/run/docker-compose.yml
.. _pymapdl_docker_compose_local: https://github.com/ansys/pymapdl/blob/main/docker/docker-compose.local.yml
.. _pymapdl_docker_compose_license_server: https://github.com/ansys/pymapdl/blob/main/docker/docker-compose.license_server.yml
.. _pymapdl_discussion_differences_mapdl_pymapdl: https://github.com/ansys/pymapdl-reader/issues/185
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
142 changes: 0 additions & 142 deletions docker/docker-compose.yml

This file was deleted.

59 changes: 59 additions & 0 deletions docker/run/README.md
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
117 changes: 117 additions & 0 deletions docker/run/docker-compose.yml
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

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
Loading