-
Notifications
You must be signed in to change notification settings - Fork 0
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
Youshaa Murhij
committed
Feb 11, 2024
1 parent
1bfb33d
commit d98aac3
Showing
8 changed files
with
224 additions
and
3 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 |
---|---|---|
|
@@ -3,5 +3,4 @@ | |
/vis/vis_results | ||
/outputs* | ||
**.pth | ||
/docker | ||
/evaluation/**.txt |
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
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
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
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,63 @@ | ||
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
#Install required apt libs and packages | ||
RUN apt-get update -y && \ | ||
apt-get autoremove -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
wget \ | ||
curl \ | ||
python3.9 \ | ||
python3-pip \ | ||
python3-dev\ | ||
python3-tk \ | ||
ca-certificates \ | ||
lsb-release \ | ||
ninja-build \ | ||
build-essential \ | ||
git \ | ||
software-properties-common \ | ||
cmake \ | ||
libx11-6 ffmpeg libsm6 libxext6 \ | ||
libegl1 \ | ||
libgl1 \ | ||
libgomp1 \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& apt-get clean | ||
|
||
# Update pip & install pytorch | ||
RUN python3 -m pip install pip --upgrade | ||
|
||
RUN pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 --index-url https://download.pytorch.org/whl/cu118 | ||
|
||
# Set up environment Arch | ||
ENV TORCH_CUDA_ARCH_LIST="5.2 6.0 6.1 7.0 7.5 8.0 8.6+PTX" | ||
|
||
|
||
RUN FORCE_CUDA=1 python3 -m pip install 'git+https://github.com/facebookresearch/[email protected]' | ||
RUN python3 -m pip install "git+https://github.com/facebookresearch/pytorch3d.git" | ||
|
||
RUN python3 -m pip install \ | ||
setuptools \ | ||
tim \ | ||
opencv-python | ||
|
||
# Install Open3D from the PyPI repositories | ||
# RUN python3 -m pip install --no-cache-dir --upgrade pip && \ | ||
# python3.9 -m pip install --no-cache-dir --upgrade open3d==0.14.1 | ||
|
||
# User setup | ||
ARG USER=user | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
# default password | ||
ARG PW=user | ||
|
||
RUN useradd -m ${USER} --uid=${UID} && echo "${USER}:${PW}" | chpasswd && adduser ${USER} sudo | ||
|
||
WORKDIR /home/${USER} | ||
RUN cd /home/${USER} && mkdir -p dagm_mono && chown -R ${UID}:${GID} ./ | ||
|
||
USER ${UID}:${GID} | ||
|
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,22 @@ | ||
#!/bin/bash | ||
|
||
yellow=`tput setaf 3` | ||
green=`tput setaf 2` | ||
violet=`tput setaf 5` | ||
reset_color=`tput sgr0` | ||
|
||
ARCH="$(uname -m)" | ||
|
||
main () { | ||
pushd "$(dirname "$0")"; | ||
if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "aarch64" ]; then | ||
file="./Dockerfile.${ARCH}" | ||
else | ||
echo "There is no Dockerfile for ${yellow}${ARCH}${reset_color} arch" | ||
fi | ||
echo "Building image for ${yellow}${ARCH}${reset_color} arch. from Dockerfile: ${yellow}${file}${reset_color}" | ||
docker build -f ${file} . -t ${ARCH}/dagm_mono:latest; | ||
popd; | ||
} | ||
|
||
main "$@"; exit; |
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,7 @@ | ||
#!/bin/bash | ||
|
||
docker exec -it --user "user" dagm_mono \ | ||
/bin/bash -c " | ||
cd /home/user/dagm_mono; | ||
export PYTHONPATH=\"${PYTHONPATH}:/home/user/dagm_mono\"; | ||
/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,52 @@ | ||
#!/bin/bash | ||
|
||
cd "$(dirname "$0")" | ||
cd .. | ||
|
||
workspace_dir=$PWD | ||
desktop_start() { | ||
docker run --ipc=host -it -d --rm \ | ||
--gpus 'all,"capabilities=compute,utility,graphics"' \ | ||
--env="DISPLAY" \ | ||
--env="QT_X11_NO_MITSHM=1" \ | ||
--privileged \ | ||
--name dagm_mono \ | ||
--net "host" \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \ | ||
-v $workspace_dir/:/home/user/dagm_mono:rw \ | ||
${ARCH}/dagm_mono:latest | ||
|
||
XAUTH=/tmp/.docker.xauth | ||
|
||
xauth_list=$(xauth nlist :0 | tail -n 1 | sed -e 's/^..../ffff/') | ||
if [ ! -f $XAUTH ]; then | ||
if [ ! -z "$xauth_list" ]; then | ||
echo $xauth_list | xauth -f $XAUTH nmerge - | ||
else | ||
touch $XAUTH | ||
fi | ||
chmod a+r $XAUTH | ||
fi | ||
|
||
file $XAUTH | ||
ls -FAlh $XAUTH | ||
} | ||
|
||
|
||
main () { | ||
if [ "$(docker ps -aq -f status=exited -f name=dagm_mono)" ]; then | ||
docker rm dagm_mono; | ||
fi | ||
|
||
ARCH="$(uname -m)" | ||
|
||
desktop_start; | ||
|
||
docker exec -it --user "user" dagm_mono \ | ||
/bin/bash -c " | ||
cd /home/user/dagm_mono; | ||
"; | ||
} | ||
|
||
main; | ||
|