-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
UID=1000 | ||
GID=1000 | ||
SPIRES_DIR=${HOME_DIR}/oxford_spires_dataset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
ARG UBUNTU_VERSION=22.04 | ||
ARG NVIDIA_CUDA_VERSION=11.8.0 | ||
|
||
############## | ||
# Base image # | ||
############## | ||
FROM nvidia/cuda:${NVIDIA_CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION} as base | ||
|
||
ARG ROS_DISTRO=noetic | ||
ARG COLMAP_VERSION=3.8 | ||
ARG CUDA_ARCHITECTURES=native | ||
ARG HOME_DIR=/home | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
git \ | ||
python-is-python3 \ | ||
python3.10-dev \ | ||
python3-pip \ | ||
vim \ | ||
wget && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN python -m pip install --no-cache-dir --upgrade pip setuptools pathtools promise pybind11 | ||
|
||
#################### | ||
# Deployment image # | ||
#################### | ||
FROM base as deploy | ||
|
||
ARG GID | ||
ARG UID | ||
ENV UNAME=docker_dev | ||
RUN addgroup --gid $GID $UNAME | ||
RUN adduser --disabled-password --gecos '' --uid $UID --gid $GID $UNAME | ||
|
||
ARG SPIRES_DIR=/home/docker_dev/oxford_spires_dataset | ||
WORKDIR ${SPIRES_DIR} | ||
|
||
COPY ./requirements.txt ${SPIRES_DIR}/requirements.txt | ||
RUN pip install -r requirements.txt | ||
COPY ./oxford_spires_dataset/ ${SPIRES_DIR}/oxford_spires_dataset | ||
COPY ./pyproject.toml ${SPIRES_DIR}/pyproject.toml | ||
RUN cd ${SPIRES_DIR}/spires_cpp && pip install -e . | ||
RUN pip install -e . | ||
|
||
# Make the outputs of the container match the host | ||
|
||
RUN chown -R ${UID}:${GID} ${SPIRES_DIR}/* | ||
USER ${UNAME} | ||
RUN echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u@docker-\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> ~/.bashrc | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
services: | ||
ndp: | ||
container_name: spires_container | ||
build: | ||
context: .. | ||
dockerfile: .docker/Dockerfile | ||
target: deploy | ||
args: | ||
- USERNAME=${USER:-user} | ||
- UID=${UID} | ||
- GID=${GID} | ||
environment: | ||
- NVIDIA_VISIBLE_DEVICES=all | ||
- NVIDIA_DRIVER_CAPABILITIES=all | ||
runtime: nvidia | ||
network_mode: "host" | ||
tty: true | ||
volumes: | ||
- ../scripts:${SPIRES_DIR}/scripts | ||
|