Add Lichtfeld-Studio files
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
[submodule "lichtfeld-studio/LichtFeld-Studio"]
|
||||||
|
path = lichtfeld-studio/LichtFeld-Studio
|
||||||
|
url = https://github.com/MrNeRF/LichtFeld-Studio
|
||||||
|
branch = master
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
base-app:
|
||||||
|
restart: no
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
shm_size: '12gb'
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: ../data
|
||||||
|
target: /workspace/data
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
devices:
|
||||||
|
- driver: nvidia
|
||||||
|
count: all
|
||||||
|
capabilities: [ gpu ]
|
||||||
|
|
||||||
|
win-gui-app:
|
||||||
|
extends:
|
||||||
|
service: base-app
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: /run/desktop/mnt/host/wslg/.X11-unix
|
||||||
|
target: /tmp/.X11-unix
|
||||||
|
- type: bind
|
||||||
|
source: /run/desktop/mnt/host/wslg
|
||||||
|
target: /mnt/wslg
|
||||||
|
environment:
|
||||||
|
DISPLAY: :0
|
||||||
|
WAYLAND_DISPLAY: wayland-0
|
||||||
|
XDG_RUNTIME_DIR: /mnt/wslg/runtime-dir
|
||||||
|
PULSE_SERVER: /mnt/wslg/PulseServer
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
# Builder stage
|
||||||
|
ARG CUDA_VERSION=12.8.0
|
||||||
|
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu24.04 AS builder
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV HOME=/workspace
|
||||||
|
WORKDIR ${HOME}
|
||||||
|
|
||||||
|
# Install build tools, compilers, CMake, vcpkg, and project dependencies
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
gnupg2 \
|
||||||
|
libglu1-mesa-dev \
|
||||||
|
libxcursor-dev \
|
||||||
|
libxinerama-dev \
|
||||||
|
locales \
|
||||||
|
lsb-release \
|
||||||
|
ninja-build \
|
||||||
|
pkg-config \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
python3-pip \
|
||||||
|
software-properties-common \
|
||||||
|
sudo \
|
||||||
|
unzip \
|
||||||
|
wget \
|
||||||
|
xorg-dev \
|
||||||
|
zip && \
|
||||||
|
add-apt-repository ppa:ubuntu-toolchain-r/test && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
gcc-14 \
|
||||||
|
g++-14 \
|
||||||
|
gfortran-14 && \
|
||||||
|
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 60 && \
|
||||||
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 60 && \
|
||||||
|
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-14 60 && \
|
||||||
|
update-alternatives --set g++ /usr/bin/g++-14 && \
|
||||||
|
update-alternatives --set gcc /usr/bin/gcc-14 && \
|
||||||
|
update-alternatives --set gfortran /usr/bin/gfortran-14 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Bootstrap vcpkg
|
||||||
|
RUN git clone https://github.com/microsoft/vcpkg.git ${HOME}/vcpkg && \
|
||||||
|
cd ${HOME}/vcpkg && ./bootstrap-vcpkg.sh -disableMetrics
|
||||||
|
|
||||||
|
ENV VCPKG_ROOT=${HOME}/vcpkg
|
||||||
|
ENV PATH=${VCPKG_ROOT}:$PATH
|
||||||
|
|
||||||
|
# Install specific CMake version
|
||||||
|
RUN wget https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-linux-x86_64.sh && \
|
||||||
|
chmod +x cmake-4.0.3-linux-x86_64.sh && \
|
||||||
|
./cmake-4.0.3-linux-x86_64.sh --skip-license --prefix=/usr/local && \
|
||||||
|
rm cmake-4.0.3-linux-x86_64.sh
|
||||||
|
|
||||||
|
# Fetch Libtorch
|
||||||
|
WORKDIR ${HOME}/LichtFeld-Studio
|
||||||
|
RUN wget https://download.pytorch.org/libtorch/cu128/libtorch-cxx11-abi-shared-with-deps-2.7.1%2Bcu128.zip && \
|
||||||
|
unzip libtorch-cxx11-abi-shared-with-deps-2.7.1+cu128.zip -d external/ && \
|
||||||
|
rm libtorch-cxx11-abi-shared-with-deps-2.7.1+cu128.zip
|
||||||
|
|
||||||
|
# Build the project. Disable OpenGL-CUDA Interop since this isn't supported by
|
||||||
|
# WSL yet https://docs.nvidia.com/cuda/wsl-user-guide/index.html
|
||||||
|
COPY LichtFeld-Studio ${HOME}/LichtFeld-Studio
|
||||||
|
RUN cmake -B build \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DENABLE_CUDA_GL_INTEROP=OFF \
|
||||||
|
-G Ninja && \
|
||||||
|
cmake --build build -- -j8
|
||||||
|
|
||||||
|
# Runtime stage
|
||||||
|
FROM nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu24.04
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV HOME=/workspace
|
||||||
|
WORKDIR ${HOME}
|
||||||
|
|
||||||
|
# Install only the runtime dependencies
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
libgl1 \
|
||||||
|
libglu1-mesa \
|
||||||
|
libgomp1 \
|
||||||
|
openssh-client \
|
||||||
|
unzip \
|
||||||
|
wget \
|
||||||
|
x11-apps \
|
||||||
|
zenity && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Copy built artifacts from the builder stage
|
||||||
|
COPY --from=builder ${HOME}/LichtFeld-Studio/build ${HOME}/LichtFeld-Studio/build
|
||||||
|
COPY --from=builder ${HOME}/LichtFeld-Studio/external ${HOME}/LichtFeld-Studio/external
|
||||||
|
COPY --from=builder ${HOME}/LichtFeld-Studio/parameter ${HOME}/LichtFeld-Studio/parameter
|
||||||
|
COPY --from=builder ${HOME}/LichtFeld-Studio/resources ${HOME}/LichtFeld-Studio/resources
|
||||||
|
COPY --from=builder ${HOME}/LichtFeld-Studio/weights ${HOME}/LichtFeld-Studio/weights
|
||||||
|
|
||||||
|
ENV PATH="${HOME}/LichtFeld-Studio/build:$PATH"
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash"]
|
||||||
Submodule
+1
Submodule lichtfeld-studio/LichtFeld-Studio added at 48a4a85573
@@ -0,0 +1,9 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
lichtfeld-studio:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
image: lichtfeld-studio:dev
|
||||||
|
extends:
|
||||||
|
file: ../config.yml
|
||||||
|
service: win-gui-app
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
docker compose run --rm -it --name lichtfeld-studio lichtfeld-studio
|
||||||
Reference in New Issue
Block a user