Skip to content

tactus run fails from Tactus-examples when sandbox is enabled (Docker build context expects Tactus source tree) #33

@endymion

Description

@endymion

When installing tactus from PyPI and running examples from Tactus-examples, tactus run fails by default because it tries to build a Docker sandbox image using a Dockerfile that assumes the current working directory contains the Tactus source tree (pyproject.toml, README.md, and tactus/). Those files aren’t present in Tactus-examples, so the docker build fails immediately.

Environment

  • OS: macOS
  • Python: 3.12.7 (note: system Python 3.9 fails to install because tactus requires Python >= 3.11)
  • tactus: 0.33.0 (pip install tactus)
  • Docker: installed + available on PATH

Repro steps

python3.12 -m venv .venv
source .venv/bin/activate
pip install tactus

git clone https://github.com/AnthusAI/Tactus-examples.git
cd Tactus-examples

# This passes
tactus test 01-getting-started/01-hello-world.tac --mock

# This fails (default behavior)
tactus run 01-getting-started/01-hello-world.tac

Expected behavior

tactus run 01-getting-started/01-hello-world.tac should run from Tactus-examples after a normal pip install tactus (typical quickstart workflow).

Actual behavior

tactus run attempts to build/rebuild the sandbox Docker image and fails because the Dockerfile contains:

  • COPY pyproject.toml ./
  • COPY README.md ./
  • COPY tactus/ ./tactus/

Those files don’t exist in Tactus-examples, so docker build fails with “not found”.

Error excerpt

#9 [ 5/13] COPY pyproject.toml ./
#9 ERROR: failed to calculate checksum ... "/pyproject.toml": not found

#10 [ 6/13] COPY README.md ./
#10 ERROR: failed to calculate checksum ... "/README.md": not found

Dockerfile:35
 35 | >>> COPY pyproject.toml ./
 36 |     COPY README.md ./
 37 |     COPY tactus/ ./tactus/
ERROR: failed to solve: failed to compute cache key ... "/pyproject.toml": not found

Workaround

Running without Docker isolation works:

tactus run 01-getting-started/01-hello-world.tac --no-sandbox --mock-all

Why this seems like a bug

The sandbox build appears to use the caller’s current directory as build context, but the Dockerfile requires files only available in the Tactus source repo. That makes the default tactus run fail for the common “pip install + clone examples” workflow.

Possible fixes

  • Don’t rebuild the sandbox image from the current repo context; ship/pull a prebuilt sandbox image by default.
  • Or change the docker build context / Dockerfile so it doesn’t assume it’s running from the Tactus source checkout.
  • Or only attempt sandbox rebuild when running from the Tactus source tree (and otherwise use a packaged/prebuilt image).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions