Spark+Pig big data stack with Scala, tweakcc optimized for distributed data processing workflows
2.9K
Cost savings: use the tweakcc reduced system prompt + specialized Spark/Pig tools for the best results. A default Claude Code prompt injects 30K+ characters per turn -- that's $90/MTurn on Sonnet and $150 on Opus for tokens you never read. The tweakcc thinkingVerbs and ablated prompts trim this to ~10K, saving up to 90% on cached reads and ~$4.50/hour in input for a coding session at 100 requests/hour.
Drop big data scripts into a container and ask Claude to run Spark jobs, execute Pig Latin pipelines, and process datasets. This image combines Claude Code (abliterated) with Apache Spark, PySpark, Apache Pig, Hadoop client, and full environment configuration -- a complete big data development workstation optimized for disconnected enterprise environments.
This container is a focused Apache Spark + Pig development environment. Mount whatever data processing scripts, Spark apps, or Pig Latin pipelines you want to work on, start the container, and Claude automatically gets:
No configuration, no setup. Give it a Spark or Pig script and ask Claude to run, process, and ship.
# First, navigate to your project directory.
# cd $HOME/git/my-project
# Run a Spark job with Claude
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest
# Or with podman:
podman run -u $(id -u):$(id -g) --userns=keep-id \
-e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest
# Then send a prompt:
# "Run this PySpark word count, then process the results with Pig"
# Spark job with local cluster mode:
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest spark-submit --master local[4] script.py
# Or with podman:
podman run -u $(id -u):$(id -g) --userns=keep-id \
-e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest spark-submit --master local[4] script.py
# With a local Ollama model:
docker run -u $(id -u):$(id -g) -e OLLAMA_MODEL=gemma4:31b \
-e OLLAMA_HOST=10.12.2.4 \
-e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest
# Or with podman:
podman run -u $(id -u):$(id -g) --userns=keep-id \
-e OLLAMA_MODEL=gemma4:31b \
-e OLLAMA_HOST=10.12.2.4 \
-e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest
# Claude-tools shell — invoke a shell with claude-shell capabilities
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest /bin/bash
# Or with podman:
podman run -u $(id -u):$(id -g) --userns=keep-id \
-e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest /bin/bash
# With privileges (for HDFS access or shared memory):
docker run --privileged -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest
# Or with podman (no --userns flag needed in privileged mode):
podman run --privileged -u $(id -u):$(id -g) \
-e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest
Claude connects to the SparkSession, runs spark-submit with local mode, traces DataFrame operations, and returns a natural-language report -- all from one prompt.
With the /bin/bash argument, the container starts an interactive shell where claude-tools are available on $PATH and Claude Code is configured for development. From the shell you can:
claude-fix to analyze Spark errors and propose fixesclaude-bash for bash sessions with smarter timeoutsclaude-agent to launch Claude as a persistent agent/fix, /ask, /plan) directly to Claudeclaude-fix --comment to post inline PR comments or --fix to apply findings directlyFor claude-tools examples and full reference, see mijuny/claude-tools.
Setting up Spark + Pig typically means installing JDK 21, downloading Spark tarballs, configuring SPARK_HOME, setting up Hadoop client libs, and managing multiple environment variables. This container bundles it all and makes it accessible to Claude via a single docker run prompt.
| Without this container | With apache-claude-abliterated |
|---|---|
| Install JDK 21, Spark tarball, Pig tarball, Hadoop client | docker run -- everything is pre-configured with SPARK_HOME, PIG_HOME, JAVA_HOME |
| Write PySpark scripts, run spark-submit manually for each test | Claude runs spark-submit --master local[4] and parses results automatically |
| Manage Pig Latin scripts across local/mapreduce modes | Ask Claude to switch cluster modes; it knows the flags |
| Clean up /tmp/spark-* and shuffle artifacts after testing | Post-stop hooks run automatically on container exit |
| One tool per terminal session | Spark, PySpark, Pig, Hadoop fs all available in one shell |
The container works with any big data project under /workdir:
pig -x local), mapreduce mode (pig -x mapreduce)spark-shell, pyspark REPLs for experimentationhadoop fs -ls, -put, -get for filesystem management| Component | Source | Description |
|---|---|---|
| Spark | archive.apache.org | Core toolchain (spark-submit, spark-shell, pyspark) |
| Claude Code | claude-abliterated/ | Abliterated CLI with tweakcc, 200+ skills, rules |
| Pig | archive.apache.org | Pig Latin execution engine (local/mapreduce modes) |
| Hadoop client | EPEL / Rocky Linux | HDFS filesystem operations (hadoop fs) |
| Mode | spark-submit flag | pig flag | Use Case |
|---|---|---|---|
| Local (single JVM) | --master local[N] | -x local | Development, testing |
| Standalone cluster | --master spark://host:7077 | -- | Medium-scale processing |
| YARN (Hadoop) | --master yarn --deploy-mode cluster | -x mapreduce | Enterprise Hadoop clusters |
| Kubernetes | --master k8s https://api:6443 | -- | Container orchestration |
| Format | Spark Reader | Pig Loader | Notes |
|---|---|---|---|
| CSV | read.csv() / format("csv") | PigStorage(',') | Supports headers, schema inference |
| JSON | read.json() / format("json") | JsonLoader(...) | Mixed types possible in JSON arrays |
| Parquet | read.parquet() / format("parquet") | -- | Columnar storage, best for Spark |
| ORC | read.orc() / format("orc") | -- | Hive-optimized columnar format |
| Text | read.text() | TextLoader() | One line per record |
| JDBC | read.jdbc(url, table) | -- | Connect to PostgreSQL/MySQL/etc. |
On container stop:
/tmp/spark-* worker logs and temp directories are removed/tmp/shuff*) cleaned up/tmp/hadoop-${USER}) removed/tmp/pig_*) cleaned up| Variable | Default | Description |
|---|---|---|
SPARK_HOME | /opt/spark | Spark installation directory |
PIG_HOME | /opt/pig | Pig installation directory |
HADOOP_HOME | /opt/hadoop | Hadoop client home directory |
JAVA_HOME | /usr/lib/jvm/java-21-openjdk | Java runtime home (from base image) |
PYSPARK_PYTHON | python3 | Python interpreter for PySpark |
Extends Claude Code with specialized command-line tools. Available scripts are automatically in $PATH and activate via slash commands or Claude's built-in tool use:
claude-fix # Fix code issues with context-aware edits
claude-ask # Ask questions, get answers without side effects
claude-bash # Run bash with smarter timeouts and session persistence
claude-agent # Launch Claude as a persistent agent
To invoke the claude-tools development shell, add /bin/bash to your docker run or podman run command. This starts an interactive shell where claude-tools are available on $PATH and Claude Code is configured for development:
# claude-tools development shell with Docker
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest /bin/bash
# Or with podman:
podman run -u $(id -u):$(id -g) --userns=keep-id \
-e ANTHROPIC_API_KEY=sk-... \
-v "$PWD:/workdir:rw" \
t2fn/apache-claude-abliterated:latest /bin/bash
From the shell you can run claude-fix, claude-ask, claude-bash, claude-agent, and send slash commands (/fix, /ask, /plan) directly to Claude. Use claude-fix --comment to post inline PR comments or --fix to apply findings directly.
More examples: mijuny/claude-tools/tree/main/README.md
This container runs on claude-abliterated:rocky10, which uses the tweakcc (tweakcc-fixed) reduced system prompt to cut ~67% off daily-flow prompts -- from ~30K to ~10K characters. For big data development, this means:
"Claude" and "Claude Code" are registered trademarks of Anthropic, PBC. This project uses the name "Claude" in a nominative (descriptive) sense -- it identifies the Anthropic product (Claude Code) that this project is built to work with, consistent with the nominative fair use doctrine. The use is necessary: a third-party project cannot refer to "Claude Code" without using the mark itself.
This project is not affiliated with, endorsed by, or sponsored by Anthropic, PBC. The name "apache-claude-abliterated" is a third-party project name where:
The project uses both "Apache" and "Claude" to describe what it works with, not who it is from.
"Spark", "Apache Spark" are trademarks of The Apache Software Foundation. References to Spark in this document are nominative -- they describe the technology this container works with, not endorsement by the ASF.
All other trademarks belong to their respective owners. No implication of endorsement is made by the use of these marks.
| Container | Purpose | Hub |
|---|---|---|
| asm-claude-abliterated | Cross-architecture assembly dev stack | Hub |
| gcc-claude-abliterated | C/C++ development with clang + valgrind | Hub |
| golang-claude-abliterated | Go development with gopls + golangci-lint | Hub |
| python-claude-abliterated | Python linting with ruff + mypy | Hub |
| rust-claude-abliterated | Rust dev with clippy + cargo | Hub |
| java-claude-abliterated | Java/Spring Boot with Maven + Gradle | Hub |
| typescript-claude-abliterated | TypeScript dev with biome + eslint | Hub |
| hdl-claude-abliterated | FPGA/ASIC HDL dev (iverilog, ghdl, verilator) | Hub |
| ada-claude-abliterated | Ada development (GNAT via alr, AUnit testing) | Hub |
| cobol-claude-abliterated | COBOL compilation for mainframe modernization | Hub |
| julia-claude-abliterated | Julia scientific computing and IJulia notebooks | Hub |
| fortran-claude-abliterated | Fortran HPC with BLAS/LAPACK math libs | Hub |
| ghidra-claude-abliterated | Ghidra reverse engineering and malware inspection | Hub |
Source code and suggestions/issues/pull requests can be made at:
Content type
Image
Digest
sha256:da60787e1…
Size
1.4 GB
Last updated
28 days ago
docker pull t2fn/apache-claude-abliterated