Lay3rss / Grounded-Segment-Anything

Fork from Grounded-SAM: Marrying Grounding-DINO with Segment Anything & Stable Diffusion & Recognize Anything - Automatically Detect , Segment and Generate Anything
https://arxiv.org/abs/2401.14159
Apache License 2.0
0 stars 0 forks source link

Installation using Docker #1

Open rebecca-lay3rs opened 8 months ago

rebecca-lay3rs commented 8 months ago

inside the repo we can find Dockerfile

Dockerfile sets the total machine environment for the repository

To build the Dockerfile, we use the Makefile with all the shell commands (edited from the original one)

Make commands

make build-image
make run

inside Makefile we have two functions:

Docker commands

docker ps
docker ps -a
docker stop ID
docker images
docker image rm ID
docker exec -it gsa /bin/bash

The Docker run command is configured to mount the home/appuser/working_dir/ to the github cloned repository ~/Grounded-Segment-Anything, so we can change the files inside the Container (/home/appuser/working_dir) and it will change the local hosto folder ~/Grounded-Segment-Anything. This is important because the Docker Container can crash and we might lose the work.

Tmux inside Docker https://stackoverflow.com/questions/51809181/how-to-run-tmux-inside-a-docker-container

apt-get update && \
  apt install -y tmux &&

Jupyter Notebook

H100 Compute Capability

https://developer.nvidia.com/cuda-gpus GPU Compute Capability
NVIDIA H100 9.0
NVIDIA A100 8.0
rebecca-lay3rs commented 8 months ago
(base) root@h100-rebecca:~/Grounded-Segment-Anything# docker ps
CONTAINER ID   IMAGE     COMMAND                  CREATED       STATUS       PORTS                                       NAMES
b464b2bb26c4   gsa:v0    "/opt/nvidia/nvidia_…"   2 hours ago   Up 2 hours   0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   gsa
(base) root@h100-rebecca:~/Grounded-Segment-Anything# docker stop b464b2bb26c4
b464b2bb26c4
(base) root@h100-rebecca:~/Grounded-Segment-Anything# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
gsa          v0        813eb17e9d25   3 hours ago   22.5GB
(base) root@h100-rebecca:~/Grounded-Segment-Anything#