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

Support New Docker Image #12

Merged
merged 1 commit into from
Dec 6, 2024
Merged
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
65 changes: 23 additions & 42 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,29 @@
FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime
FROM ghcr.io/moriyalab/docker-ffmpeg:latest

RUN apt-get update && apt-get install -y --no-install-recommends \
git \
vim \
curl \
wget \
xz-utils \
libavutil-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
pkg-config \
build-essential \
libffi-dev
RUN pip install --upgrade pip setuptools

RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz \
&& tar xvf ./ffmpeg-git-amd64-static.tar.xz \
&& cp ./ffmpeg*amd64-static/ffmpeg /usr/local/bin/
WORKDIR /workspace
RUN apt update && apt install -y git vim curl python3 python3-pip libgl1-mesa-glx
RUN pip install -U pip && \
pip install torch==2.5.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 && \
pip install \
matplotlib==3.7 \
setuptools==75.6.0 \
tikzplotlib \
jpeg4py \
opencv-python \
lmdb \
pandas \
scipy \
loguru \
flake8 \
hydra-core \
iopath \
ultralytics==8.2.63 \
gradio==4.44.0 \
ffmpeg-python==0.2.0 \
gdown==5.2 \
lapx==0.5.10

RUN git clone -b master --single-branch --depth=1 https://github.com/moriyalab/samurai.git
RUN cd /workspace/samurai/sam2 && \
pip install -e .

RUN cd /workspace/samurai/sam2 && \
pip install -e ".[notebooks]" && \
pip install \
matplotlib==3.7 \
tikzplotlib \
jpeg4py \
opencv-python \
lmdb \
pandas \
scipy \
loguru \
flake8 \
ultralytics==8.2.63 \
gradio==4.44.0 \
ffmpeg-python==0.2.0 \
gdown==5.2 \
lapx==0.5.10

RUN cd /workspace/samurai/sam2/checkpoints && \
./download_ckpts.sh && \
cd ..

RUN mkdir -p /workspace/horus_inference_server
2 changes: 1 addition & 1 deletion run_dev_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PLATFORM="$(uname -m)"
if [ $PLATFORM = "x86_64" ]; then
echo "x86"
docker pull ghcr.io/moriyalab/horus_inference_server:latest
docker run -it --rm --gpus all --runtime nvidia --shm-size=32G -v $ROOT:/workspace/horus_inference_server -w /workspace/horus_inference_server --network host ghcr.io/moriyalab/horus_inference_server:latest
docker run -it --rm --gpus all --runtime nvidia -u $(id -u):$(id -g) --shm-size=32G -v $ROOT:/workspace/horus_inference_server -w /workspace/horus_inference_server --network host ghcr.io/moriyalab/horus_inference_server:latest
else
echo "Not Support Platform. Only support x86."
fi
Loading