Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile + build and run scripts #5

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM nvcr.io/nvidia/pytorch:24.01-py3
ARG DEBIAN_FRONTEND=noninteractive

COPY requirements.txt /workdir/requirements.txt
RUN pip install -r /workdir/requirements.txt

RUN mkdir /workdir/checkpoints/
RUN wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P /workdir/checkpoints/

COPY croco /workdir/croco
RUN cd /workdir/croco/models/curope/ ; python setup.py build_ext --inplace

WORKDIR /workdir
COPY demo.py /workdir/demo.py
COPY dust3r /workdir/dust3r
RUN pip install opencv-python==4.8.0.74
CMD python3 /workdir/demo.py --weights /workdir/checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth --server_name 0.0.0.0

# Use --image_size to select the correct resolution for your checkpoint. 512 (default) or 224
# Use --local_network to make it accessible on the local network, or --server_name to specify the url manually
# Use --server_port to change the port, by default it will search for an available port starting at 7860
# Use --device to use a different device, by default it's "cuda"


#wget progress...
# --no-verbose --show-progress --progress=dot:mega
2 changes: 2 additions & 0 deletions build_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker build -t dust3r .

1 change: 1 addition & 0 deletions run_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run --gpus all --ipc=host -p 7860:7860 -it dust3r #bash