Skip to content

Commit 44d4224

Browse files
committed
refactor code
1 parent 2031489 commit 44d4224

File tree

14 files changed

+1086
-395
lines changed

14 files changed

+1086
-395
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6+
*/output/*
7+
NPField/output/*
8+
9+
610
# C extensions
711
*.so
812

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"spellright.language": [
3+
"en-US-10-1."
4+
],
5+
"spellright.documentTypes": [
6+
"markdown",
7+
"latex",
8+
"plaintext",
9+
"html"
10+
]
11+
}

Dockerfile

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Base image with NVIDIA CUDA 12.4.1 on Ubuntu 22.04
22
ARG IMAGE_NAME=nvidia/cuda
3-
FROM ${IMAGE_NAME}:12.4.1-devel-ubuntu22.04 as base
3+
FROM ${IMAGE_NAME}:12.4.1-devel-ubuntu22.04 AS base
44

55
# Set environment variables for various CUDA libraries
6-
ENV NV_CUDA_LIB_VERSION 12.4.1-1
7-
ENV NV_NVTX_VERSION 12.4.127-1
8-
ENV NV_LIBNPP_VERSION 12.2.5.30-1
9-
ENV NV_LIBNPP_PACKAGE libnpp-12-4=${NV_LIBNPP_VERSION}
10-
ENV NV_LIBCUSPARSE_VERSION 12.3.1.170-1
11-
ENV NV_LIBCUBLAS_PACKAGE_NAME libcublas-12-4
12-
ENV NV_LIBCUBLAS_VERSION 12.4.5.8-1
13-
ENV NV_LIBCUBLAS_PACKAGE ${NV_LIBCUBLAS_PACKAGE_NAME}=${NV_LIBCUBLAS_VERSION}
14-
ENV NV_LIBNCCL_PACKAGE_NAME libnccl2
15-
ENV NV_LIBNCCL_PACKAGE_VERSION 2.21.5-1
16-
ENV NCCL_VERSION 2.21.5-1
17-
ENV NV_LIBNCCL_PACKAGE ${NV_LIBNCCL_PACKAGE_NAME}=${NV_LIBNCCL_PACKAGE_VERSION}+cuda12.4
6+
ENV NV_CUDA_LIB_VERSION=12.4.1-1
7+
ENV NV_NVTX_VERSION=12.4.127-1
8+
ENV NV_LIBNPP_VERSION=12.2.5.30-1
9+
ENV NV_LIBNPP_PACKAGE=libnpp-12-4=${NV_LIBNPP_VERSION}
10+
ENV NV_LIBCUSPARSE_VERSION=12.3.1.170-1
11+
ENV NV_LIBCUBLAS_PACKAGE_NAME=libcublas-12-4
12+
ENV NV_LIBCUBLAS_VERSION=12.4.5.8-1
13+
ENV NV_LIBCUBLAS_PACKAGE=${NV_LIBCUBLAS_PACKAGE_NAME}=${NV_LIBCUBLAS_VERSION}
14+
ENV NV_LIBNCCL_PACKAGE_NAME=libnccl2
15+
ENV NV_LIBNCCL_PACKAGE_VERSION=2.21.5-1
16+
ENV NCCL_VERSION=2.21.5-1
17+
ENV NV_LIBNCCL_PACKAGE=${NV_LIBNCCL_PACKAGE_NAME}=${NV_LIBNCCL_PACKAGE_VERSION}+cuda12.4
1818

1919
# Update and install necessary Linux packages
2020
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -34,16 +34,29 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3434
libcusparse-12-4=${NV_LIBCUSPARSE_VERSION} \
3535
${NV_LIBCUBLAS_PACKAGE} \
3636
${NV_LIBNCCL_PACKAGE} \
37-
&& rm -rf /var/lib/apt/lists/*docke
38-
39-
# Upgrade pip
40-
RUN pip3 install --upgrade pip
37+
&& rm -rf /var/lib/apt/lists/*
4138

4239
# Create a Python virtual environment and activate it
4340
RUN python3 -m venv /env
4441
ENV PATH="/env/bin:$PATH"
4542

46-
RUN pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu124
43+
# Upgrade pip in the venv
44+
RUN pip install --upgrade pip
45+
46+
# Install PyTorch with CUDA 12.4 wheels and Python dependencies
47+
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 && \
48+
pip install \
49+
pytorch-lightning \
50+
wandb \
51+
einops \
52+
transformers \
53+
pillow \
54+
matplotlib \
55+
numpy \
56+
imageio \
57+
requests \
58+
tqdm \
59+
casadi
4760

4861
# Copy your files into the container
4962
COPY Planners /app/Planners
@@ -68,9 +81,9 @@ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/app/third-party/acados/lib
6881
ENV ACADOS_SOURCE_DIR="/app/third-party/acados"
6982

7083

71-
# Install L4casadi
84+
# Install L4casadi from the main V2 branch
7285
RUN cd /app/third-party && \
73-
git clone https://github.com/Tim-Salzmann/l4casadi.git && \
86+
git clone --branch main https://github.com/Tim-Salzmann/l4casadi.git && \
7487
cd l4casadi && \
7588
pip install -r requirements_build.txt && \
7689
pip install . --no-build-isolation
-337 KB
Binary file not shown.

0 commit comments

Comments
 (0)