File size: 1,611 Bytes
042382e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Runtime for SimForge Pilot-4B v1.5 (Python 3.12, CUDA 12.6), pinned to the benchmarked serving environment.
#   docker build -t pilot-4b .
#   docker run --gpus all -v $PWD:/repo:ro pilot-4b python /repo/inference.py               # one decision, example input
#   docker run --gpus all -p 6789:6789 -v $PWD:/repo:ro pilot-4b /repo/run_alpasim_driver.sh  # AlpaSim egodriver service
FROM nvidia/cuda:12.6.3-cudnn-devel-ubuntu24.04
RUN apt-get update && apt-get install -y --no-install-recommends python3.12 python3.12-venv python3.12-dev git build-essential \
    && rm -rf /var/lib/apt/lists/* && python3.12 -m venv /opt/venv
ENV PATH=/opt/venv/bin:$PATH
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -U pip wheel setuptools && pip install --no-cache-dir -r /tmp/requirements.txt
# AlpaSim egodriver interface for the closed-loop service. Its metadata pins protobuf<5; the benchmarked image runs it
# with protobuf 7.36.1, so it is installed without dependencies exactly as there.
RUN pip install --no-cache-dir --no-deps "alpasim_grpc @ git+https://github.com/NVlabs/alpasim@cd713e0d0563352ce45b99d0a53a7173d581bde2#subdirectory=src/grpc"
# causal-conv1d compiles against the installed torch (the fast path of the VLM linear-attention layers)
ARG TORCH_CUDA_ARCH_LIST="8.0;8.6;8.9;9.0;12.0"
RUN TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST" MAX_JOBS=16 pip install --no-cache-dir --no-build-isolation causal_conv1d==1.7.0
ENV PYTHONPATH=/repo/pilot:/repo/pilot/lib \
    PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
    HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1
WORKDIR /tmp