aws-samples / aws-samples/aws-batch-comp-infrastructure-sample

Experimenting with the docker images does not work

Open
#53 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
12
Forks
14
Avg merge
16h 1m
Merged PRs (30d)
3

Description

I am running GNU Linux 7.1.6 (Arch Linux).

On the `mainline-2026` branch, the documentation suggests using `docker run -it --rm /bin/bash` to locally investigate the docker image.

However, even running the base image `satcomp-infrastructure:latest` (after already activating the virtual environment) fails with:

```
2026-08-10 15:24:08 - Entrypoint - INFO - Local IP address: 172.17.0.2
Traceback (most recent call last):
File "/opt/amazon/scripting/harness/entrypoints/entrypoint.py", line 18, in
senv = SolverEnvironment.from_env()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/amazon/scripting/common/solver_env.py", line 176, in from_env
return SolverEnvironment(
^^^^^^^^^^^^^^^^^^
File "/opt/amazon/scripting/common/solver_env.py", line 110, in __init__
self._validate()
File "/opt/amazon/scripting/common/solver_env.py", line 118, in _validate
validate_not_none(self.SOLVER_KEY, self.solver)
File "/opt/amazon/scripting/common/solver_env.py", line 116, in validate_not_none
raise ValueError(f"{key} cannot be None")
ValueError: SOLVER_NAME cannot be None
```

What worked for me was explicitly specifying the environment variables, by adding e.g.:
```
-e SOLVER_NAME=smts -e PROJECT_NAME=smts26 -e LOCAL_TEST_FILES='/opt/amazon/test_formulas/**/*.smt2' -e LOCAL_TIMEOUT=10
```

However, this does not work for testing distributed solvers. To enforce using `DistributedTestRunner` that is called for them, one needs to further add
```
-e SOLVER_NODE_TYPE=distributed-leader
```
along with e.g. `-e NUM_WORKERS=7`. This fails with:
```
2026-08-10 15:32:43 - Entrypoint - INFO - Local IP address: 172.17.0.2
2026-08-10 15:32:43 - Entrypoint - INFO - Environment variables are: {'SOLVER_NAME': 'smts-distributed', 'PROJECT_NAME': 'smts26', 'SOLVER_NODE_TYPE': 'distributed-leader', 'NUM_WORKERS': 7, 'LOCAL_TEST_FILES': '/opt/amazon/test_formulas/**/*.smt2', 'LOCAL_TIMEOUT': 10}
2026-08-10 15:32:43 - Entrypoint - INFO - I am a leader. About to call `leader.run()`
2026-08-10 15:32:43 - Leader Entrypoint - INFO - Started leader entrypoint
Traceback (most recent call last):
File "/opt/amazon/scripting/harness/entrypoints/entrypoint.py", line 23, in
leader.run(senv)
File "/opt/amazon/scripting/harness/entrypoints/leader_entrypoint.py", line 375, in run
ip_table, timestamp_table = DynamoTable.get_tables_from_env(senv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/amazon/scripting/harness/aws_shim/ddb_shim.py", line 567, in get_tables_from_env
ip_table = LocalDynamoTable(
^^^^^^^^^^^^^^^^^
File "/opt/amazon/scripting/harness/aws_shim/ddb_shim.py", line 605, in __init__
self._ensure_file_exists()
File "/opt/amazon/scripting/harness/aws_shim/ddb_shim.py", line 611, in _ensure_file_exists
os.makedirs(dir_path, exist_ok=True)
File "", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/shared'
```
Adding the volume via the `-v` option of `docker run`, as used in `scripting/runner/commands/test_local_distributed.py`, is not sufficient; it then fails with `PermissionError: [Errno 13] Permission denied: '/shared/ip_table.json'`. It is probably also missing other arguments that are used in the `test_local_distributed.py` script.

Is there a way to experiment with the containers via `docker run`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.