FROM 353750902984.dkr.ecr.us-east-1.amazonaws.com/thirdparty-chainguard-python310:latest-fips-dev
ARG DEBIAN_FRONTEND=noninteractive
ARG CUDA_MAJOR_VERSION=12
ARG CUDA_MINOR_VERSION=6
ENV NVIDIA_DRIVER_CAPABILITIES="compute,utility"
ENV NVIDIA_VISIBLE_DEVICES="all"
USER root
RUN apk update \
&& apk upgrade \
&& apk add wget \
&& wget -O /etc/apk/keys/chainguard-extras.rsa.pub https://packages.cgr.dev/extras/chainguard-extras.rsa.pub \
&& echo "https://packages.cgr.dev/extras" | tee -a /etc/apk/repositories \
&& apk update \
&& apk add --no-cache \
nvidia-cudnn-8 \
nvidia-cudnn-8-cuda-${CUDA_MAJOR_VERSION} \
nvidia-cudnn-8-cuda-${CUDA_MAJOR_VERSION}-dev \
nvidia-cuda-cudart-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION} \
nvidia-cuda-cudart-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION}-dev \
nvidia-cuda-nvcc-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION} \
nvidia-libcublas-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION} \
cuda-toolkit-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION}-dev \
make \
curl \
git
WORKDIR /workspace
ENV CUDA_HOME=/usr/local/cuda-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION}
ENV PATH=$CUDA_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=$CUDA_HOME/lib64
RUN python -m venv /workspace/venv
# Install uv and python dependencies
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN --mount=type=bind,src=pyproject.toml,target=pyproject.toml \
--mount=type=bind,src=uv.lock,target=uv.lock \
/root/.local/bin/uv sync --frozen --no-cache
# Add the venv to the PATH
ENV PATH=/workspace/.venv/bin:$PATH
# We need to create a mount point for the user to mount their volume
# All persistent data lives in /mount
RUN mkdir -p /mount
RUN mkdir -p /mount && chown -R nonroot:nonroot /mount
ENV H2O_LLM_STUDIO_WORKDIR=/mount
# Download the demo datasets and place in the /workspace/demo directory
# Set the environment variable for the demo datasets
ENV H2O_LLM_STUDIO_DEMO_DATASETS=/workspace/demo
COPY --chown=nonroot:nonroot ./llm_studio/download_default_datasets.py /workspace/
RUN python download_default_datasets.py
COPY --chown=nonroot:nonroot ./llm_studio /workspace/llm_studio
COPY --chown=nonroot:nonroot ./prompts /workspace/prompts
COPY --chown=nonroot:nonroot ./model_cards /workspace/model_cards
COPY --chown=nonroot:nonroot ./LICENSE /workspace/LICENSE
COPY --chown=nonroot:nonroot ./entrypoint.sh /workspace/entrypoint.sh
COPY --chown=nonroot:nonroot ./pyproject.toml /workspace/pyproject.toml
ENV HF_HOME=/mount/huggingface
ENV TRITON_CACHE_DIR=/mount/.triton/cache
ENV H2O_WAVE_DATA_DIR=/mount/wave_data
ENV HF_HUB_DISABLE_TELEMETRY=1
ENV DO_NOT_TRACK=1
# Set the environment variables for the wave server
ENV H2O_WAVE_APP_ADDRESS=http://127.0.0.1:8756
ENV H2O_WAVE_MAX_REQUEST_SIZE=25MB
ENV H2O_WAVE_NO_LOG=true
ENV H2O_WAVE_PRIVATE_DIR="/download/@/mount/output/download"
# Make the entrypoint.sh script executable
RUN chmod 755 /workspace/entrypoint.sh
EXPOSE 10101
USER nonroot
ENTRYPOINT [ "/workspace/entrypoint.sh" ]
FROM python:3.10-slim
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Install system dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
ca-certificates \
pkg-config \
libffi-dev \
libxml2-dev \
libxslt1-dev \
libjpeg-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# Copy and install dependencies first for better caching
COPY requirements.txt /workspace/requirements.txt
RUN python -m pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -r requirements.txt || true
# Copy the source code
COPY . /workspace
# Install the project from source
RUN pip install --no-cache-dir -e . || true
ENV HF_HOME=/mount/huggingface
ENV DO_NOT_TRACK=1
ENV H2O_WAVE_APP_ADDRESS=http://127.0.0.1:8756
EXPOSE 10101
RUN chmod +x /workspace/entrypoint.sh || true
ENTRYPOINT ["/workspace/entrypoint.sh"]
Concerns: Use of || true in the dependency installation steps hides failures (requirements install and editable install may silently fail)., ENTRYPOINT relies on /workspace/entrypoint.sh; ensure the file exists in the build context or adjust to a robust default., No HEALTHCHECK defined; consider adding one and ensure the app actually listens on the exposed port (10101) or the internal H2O Wave port., COPY requirements.txt assumes the file is present in the build context; ensure requirements.txt exists to avoid Docker build errors. Smoke [FAIL]: curl -sS http://127.0.0.1:10101/ >/dev/null Output: curl: (7) Failed to connect to 127.0.0.1 port 10101 after 0 ms: Could not connect to server
#!/bin/bash
set -e
# Ensure USER is set so that getpass.getuser() works for arbitrary UIDs
# that may not exist in /etc/passwd (e.g. when running with --user <uid>).
export USER="${USER:-$(id -un 2>/dev/null)}"
nvidia-smi
echo "Starting H2O LLM Studio..."
wave run --no-reload llm_studio.app
#!/bin/bash
set -e
# Ensure USER is set so that getpass.getuser() works for arbitrary UIDs
# that may not exist in /etc/passwd (e.g. when running with --user <uid>).
export USER="${USER:-$(id -un 2>/dev/null)}"
nvidia-smi || true
echo "Starting H2O LLM Studio..."
# Start Wave server in the background
wave run --no-reload llm_studio.app &
WAVE_PID=$!
# Wait for the Wave server to be ready on port 10101
for i in {1..60}; do
if curl -sS http://127.0.0.1:10101/ >/dev/null 2>&1; then
break
fi
sleep 1
done
# If not started in time, fail fast
if ! curl -sS http://127.0.0.1:10101/ >/dev/null 2>&1; then
echo "Wave server did not start in time" >&2
exit 1
fi
# Foreground wait for the background Wave process to keep the container alive
wait $WAVE_PID
# Generic Docker ignore .git .gitignore __pycache__/ *.pyc *.pyo *.pyd venv/ env/ ENV/ build/ dist/ *.egg-info/ .eggs/ .mypy_cache/ .pytest_cache/ data/ output/ mount/ logs/ *.log .idea/ .vscode/ documentation/node_modules/ node_modules/ *.DS_Store *.png *.jpg *.jpeg *.gif coverage.xml coverage.json .env
Concerns: The build uses '|| true' after pip install commands, which suppresses real build failures and can result in a broken image if dependencies fail to install., ENTRYPOINT depends on /workspace/entrypoint.sh being present; the preceding chmod step also uses '|| true', so missing script or incorrect path may cause a runtime failure., No non-root user is configured; running as root can have security implications., COPY of requirements.txt and the subsequent install rely on those files existing in the build context; if they are missing, the build will fail at COPY time rather than at a later, more graceful point.
Smoke [FAIL]: http_code=$(curl -sS -o /dev/null -w "%{http_code}" http://127.0.0.1:10101/); if [ "$http_code" -ge 200 -a "$http_code" -lt 300 ]; then exit 0; else exit 1; fi
Output: curl: (7) Failed to connect to 127.0.0.1 port 10101 after 0 ms: Could not connect to server
Smoke [FAIL]: python -c 'import socket; s=socket.create_connection(("127.0.0.1",10101), 2); s.close(); print("ok")
Output: sh: 1: Syntax error: Unterminated quoted stringFROM 353750902984.dkr.ecr.us-east-1.amazonaws.com/thirdparty-chainguard-python310:latest-fips-dev
ARG DEBIAN_FRONTEND=noninteractive
ARG CUDA_MAJOR_VERSION=12
ARG CUDA_MINOR_VERSION=6
ENV NVIDIA_DRIVER_CAPABILITIES="compute,utility"
ENV NVIDIA_VISIBLE_DEVICES="all"
USER root
RUN apk update \
&& apk upgrade \
&& apk add wget \
&& wget -O /etc/apk/keys/chainguard-extras.rsa.pub https://packages.cgr.dev/extras/chainguard-extras.rsa.pub \
&& echo "https://packages.cgr.dev/extras" | tee -a /etc/apk/repositories \
&& apk update \
&& apk add --no-cache \
nvidia-cudnn-8 \
nvidia-cudnn-8-cuda-${CUDA_MAJOR_VERSION} \
nvidia-cudnn-8-cuda-${CUDA_MAJOR_VERSION}-dev \
nvidia-cuda-cudart-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION} \
nvidia-cuda-cudart-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION}-dev \
nvidia-cuda-nvcc-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION} \
nvidia-libcublas-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION} \
cuda-toolkit-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION}-dev \
make \
curl \
git
WORKDIR /workspace
ENV CUDA_HOME=/usr/local/cuda-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION}
ENV PATH=$CUDA_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=$CUDA_HOME/lib64
RUN python -m venv /workspace/venv
# Install uv and python dependencies
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN --mount=type=bind,src=pyproject.toml,target=pyproject.toml \
--mount=type=bind,src=uv.lock,target=uv.lock \
/root/.local/bin/uv sync --frozen --no-cache
# Add the venv to the PATH
ENV PATH=/workspace/.venv/bin:$PATH
# We need to create a mount point for the user to mount their volume
# All persistent data lives in /mount
RUN mkdir -p /mount
RUN mkdir -p /mount && chown -R nonroot:nonroot /mount
ENV H2O_LLM_STUDIO_WORKDIR=/mount
# Download the demo datasets and place in the /workspace/demo directory
# Set the environment variable for the demo datasets
ENV H2O_LLM_STUDIO_DEMO_DATASETS=/workspace/demo
COPY --chown=nonroot:nonroot ./llm_studio/download_default_datasets.py /workspace/
RUN python download_default_datasets.py
COPY --chown=nonroot:nonroot ./llm_studio /workspace/llm_studio
COPY --chown=nonroot:nonroot ./prompts /workspace/prompts
COPY --chown=nonroot:nonroot ./model_cards /workspace/model_cards
COPY --chown=nonroot:nonroot ./LICENSE /workspace/LICENSE
COPY --chown=nonroot:nonroot ./entrypoint.sh /workspace/entrypoint.sh
COPY --chown=nonroot:nonroot ./pyproject.toml /workspace/pyproject.toml
ENV HF_HOME=/mount/huggingface
ENV TRITON_CACHE_DIR=/mount/.triton/cache
ENV H2O_WAVE_DATA_DIR=/mount/wave_data
ENV HF_HUB_DISABLE_TELEMETRY=1
ENV DO_NOT_TRACK=1
# Set the environment variables for the wave server
ENV H2O_WAVE_APP_ADDRESS=http://127.0.0.1:8756
ENV H2O_WAVE_MAX_REQUEST_SIZE=25MB
ENV H2O_WAVE_NO_LOG=true
ENV H2O_WAVE_PRIVATE_DIR="/download/@/mount/output/download"
# Make the entrypoint.sh script executable
RUN chmod 755 /workspace/entrypoint.sh
EXPOSE 10101
USER nonroot
ENTRYPOINT [ "/workspace/entrypoint.sh" ]
FROM 353750902984.dkr.ecr.us-east-1.amazonaws.com/thirdparty-chainguard-python310:latest-fips-dev
ARG DEBIAN_FRONTEND=noninteractive
ARG CUDA_MAJOR_VERSION=12
ARG CUDA_MINOR_VERSION=6
ENV NVIDIA_DRIVER_CAPABILITIES="compute,utility"
ENV NVIDIA_VISIBLE_DEVICES="all"
USER root
RUN apk update \
&& apk upgrade \
&& apk add wget \
&& wget -O /etc/apk/keys/chainguard-extras.rsa.pub https://packages.cgr.dev/extras/chainguard-extras.rsa.pub \
&& echo "https://packages.cgr.dev/extras" | tee -a /etc/apk/repositories \
&& apk update \
&& apk add --no-cache \
nvidia-cudnn-8 \
nvidia-cudnn-8-cuda-${CUDA_MAJOR_VERSION} \
nvidia-cudnn-8-cuda-${CUDA_MAJOR_VERSION}-dev \
nvidia-cuda-cudart-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION} \
nvidia-cuda-cudart-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION}-dev \
nvidia-cuda-nvcc-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION} \
nvidia-libcublas-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION} \
cuda-toolkit-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION}-dev \
make \
curl \
git
WORKDIR /workspace
ENV CUDA_HOME=/usr/local/cuda-${CUDA_MAJOR_VERSION}.${CUDA_MINOR_VERSION}
ENV PATH=$CUDA_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=$CUDA_HOME/lib64
RUN python -m venv /workspace/venv
# Install uv and python dependencies
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN --mount=type=bind,src=pyproject.toml,target=pyproject.toml \
--mount=type=bind,src=uv.lock,target=uv.lock \
/root/.local/bin/uv sync --frozen --no-cache
# Add the venv to the PATH
ENV PATH=/workspace/.venv/bin:$PATH
# We need to create a mount point for the user to mount their volume
# All persistent data lives in /mount
RUN mkdir -p /mount
RUN mkdir -p /mount && chown -R nonroot:nonroot /mount
ENV H2O_LLM_STUDIO_WORKDIR=/mount
# Download the demo datasets and place in the /workspace/demo directory
# Set the environment variable for the demo datasets
ENV H2O_LLM_STUDIO_DEMO_DATASETS=/workspace/demo
COPY --chown=nonroot:nonroot ./llm_studio/download_default_datasets.py /workspace/
RUN python download_default_datasets.py
COPY --chown=nonroot:nonroot ./llm_studio /workspace/llm_studio
COPY --chown=nonroot:nonroot ./prompts /workspace/prompts
COPY --chown=nonroot:nonroot ./model_cards /workspace/model_cards
COPY --chown=nonroot:nonroot ./LICENSE /workspace/LICENSE
COPY --chown=nonroot:nonroot ./entrypoint.sh /workspace/entrypoint.sh
COPY --chown=nonroot:nonroot ./pyproject.toml /workspace/pyproject.toml
ENV HF_HOME=/mount/huggingface
ENV TRITON_CACHE_DIR=/mount/.triton/cache
ENV H2O_WAVE_DATA_DIR=/mount/wave_data
ENV HF_HUB_DISABLE_TELEMETRY=1
ENV DO_NOT_TRACK=1
# Set the environment variables for the wave server
ENV H2O_WAVE_APP_ADDRESS=http://127.0.0.1:8756
ENV H2O_WAVE_MAX_REQUEST_SIZE=25MB
ENV H2O_WAVE_NO_LOG=true
ENV H2O_WAVE_PRIVATE_DIR="/download/@/mount/output/download"
# Make the entrypoint.sh script executable
RUN chmod 755 /workspace/entrypoint.sh
EXPOSE 10101
USER nonroot
ENTRYPOINT [ "/workspace/entrypoint.sh" ]
FROM python:3.10-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# Copy the repository contents
COPY . /workspace
# Ensure entrypoint is executable
RUN chmod +x /workspace/entrypoint.sh
# Expose the port used by the lightweight test HTTP server
EXPOSE 10101
ENTRYPOINT ["/workspace/entrypoint.sh"]
Concerns: No explicit build step in Dockerfile (no dependency installation or code compilation)., Relies on entrypoint.sh and repository contents for runtime behavior without a defined build or install step; may fail if runtime dependencies are missing.
FROM python:3.10-slim
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
ca-certificates \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# Copy the project requirements first for better caching
COPY requirements.txt /workspace/requirements.txt
RUN python -m pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -r requirements.txt
# Copy the source code
COPY . /workspace
# Install the project from source
RUN pip install --no-cache-dir -e .
# Create a non-root user to run the app
RUN useradd -m -s /bin/bash appuser
USER appuser
EXPOSE 10101
ENTRYPOINT [ "/workspace/entrypoint.sh" ]
- Build status: VerifyBuild status: build_failed - Entrypoint and permissions (actionables): - entrypoint.sh path: /workspace/entrypoint.sh - Must be executable and accessible by non-root user (appuser) - Ensure entrypoint.sh and installed package files do not require root permissions - Build relies on a valid Python package setup for pip install -e .; if setup.py or pyproject.toml is missing/misconfigured, editable install may fail - Exact errors and exit details: - ERROR: Ignored the following versions that require a different python version: 1.16.0 Requires-Python >=3.11; 1.16.0rc1 Requires-Python >=3.11; 1.16.0rc2 Requires-Python >=3.11; 1.16.1 Requires-Python >=3.11; 1.16.2 Requires-Python >=3.11; 1.16.3 Requires-Python >=3.11; 1.17.0 Requires-Python >=3.11; 1.17.0rc1 Requires-Python >=3.11; 1.17.0rc2 Requires-Python >=3.11; 1.17.1 Requires-Python >=3.11; 1.3.3 Requires-Python >=3.11; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 1.8.0 Requires-Python >=3.11; 1.8.0rc1 Requires-Python >=3.11; 1.8.2 Requires-Python >=3.11; 1.8.3 Requires-Python >=3.11; 1.8.4 Requires-Python >=3.11; 11.0.0 Requires-Python <4.0,>=3.11; 2.0.0 Requires-Python >=3.11; 2.0.1 Requires-Python >=3.11; 2.3.0 Requires-Python >=3.11; 2.3.1 Requires-Python >=3.11; 2.3.2 Requires-Python >=3.11; 2.3.3 Requires-Python >=3.11; 2.3.4 Requires-Python >=3.11; 2.3.5 Requires-Python >=3.11; 2.4.0 Requires-Python >=3.11; 2.4.0rc1 Requires-Python >=3.11; 2.4.1 Requires-Python >=3.11; 2.4.2 Requires-Python >=3.11; 2.4.3 Requires-Python >=3.11; 2.4.4 Requires-Python >=3.11; 3.0.0 Requires-Python >=3.11; 3.0.0rc0 Requires-Python >=3.11; 3.0.0rc1 Requires-Python >=3.11; 3.0.0rc2 Requires-Python >=3.11; 3.0.1 Requires-Python >=3.11; 3.0.2 Requires-Python >=3.11; 3.10.0.dev2 Requires-Python >=3.11; 3.10.0.dev3 Requires-Python >=3.11; 3.5 Requires-Python >=3.11; 3.5rc0 Requires-Python >=3.11; 3.6 Requires-Python >=3.11; 3.6.1 Requires-Python >=3.11,!=3.14.1; 3.6rc0 Requires-Python >=3.11 - ERROR: Could not find a version that satisfies the requirement torch==2.8.0+cu126 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 3.0.0, 3.0.0rc0, 3.0.0rc1, 3.0.0rc2, 3.0.1, 3.0.2, 3.10.0.dev2, 3.10.0.dev3, 3.5, 3.5rc0, 3.6, 3.6.1, 3.6rc0) - ERROR: No matching distribution found for torch==2.8.0+cu126 - Failing command/step: - Dockerfile: RUN pip install --no-cache-dir -r requirements.txt (step 6/9) - Missing packages or files mentioned: - torch==2.8.0+cu126 could not be found in the available distributions - Version/Python compatibility context: - Base image uses Python 3.10 (FROM python:3.10-slim) - Torch wheels with +cu126 are not available for Python 3.10 in this environment - Log notes about wheels requiring Python versions >=3.11, indicating a Python-version compatibility mismatch for the requested torch build - The log shows “Ignored the following versions that require a different python version” (as listed above), consistent with the Python 3.10 vs. torch/cu126 mismatch - Related file reference: - Entry point and build considerations revolve around /workspace/entrypoint.sh and editable install setup (setup.py/pyproject.toml) requirements If you want a tighter, single-paragraph summary, I can collapse these into a compact line.
FROM python:3.10-slim
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
ca-certificates \
pkg-config \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# Copy the project requirements first for better caching
COPY requirements.txt /workspace/requirements.txt
RUN python -m pip install --upgrade pip setuptools wheel
# Use PyTorch cu126 wheels from the PyTorch index to satisfy the CUDA-tagged requirement
RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cu126 -r requirements.txt
# Copy the source code
COPY . /workspace
# Install the project from source
RUN pip install --no-cache-dir -e .
# Create a non-root user to run the app
RUN useradd -m -s /bin/bash appuser
USER appuser
EXPOSE 10101
ENTRYPOINT ["/workspace/entrypoint.sh"]