Skip to content
Open
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
28 changes: 28 additions & 0 deletions deploy/nosana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "0.1",
"type": "container",
"ops": [
{
"type": "container/run",
"id": "waldo",
"args": {
"image": "docker.io/matthammond962/waldo:v1.0.0-alpha_no-model",
"gpu": true,
"expose": 5000,
"env": {
"MODEL_PATH": "/model"
},
"resources": [
{
"type": "HF",
"repo": "jinggu/jing-model",
"files": [
"vit_g_ps14_ak_ft_ckpt_7_clean.pth"
],
"target": "/model"
}
]
}
}
]
}
32 changes: 32 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM pytorch/pytorch:2.7.1-cuda12.8-cudnn9-runtime

ARG NO_MODEL=false

RUN apt-get update && apt-get install -y \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*

COPY . .

# Install requirements using pip with the system Python
# Fix NumPy compatibility and replace opencv-python with opencv-python-headless for Docker compatibility
RUN pip install --no-cache-dir numpy==1.26.4 && \
pip install --no-cache-dir -r requirements.txt && \
pip uninstall -y opencv-python opencv-python-headless && \
pip install opencv-python-headless==4.9.0.80

# Conditionally download model
RUN if [ "$NO_MODEL" != "true" ]; then \
pip install huggingface_hub && \
hf download jinggu/jing-model vit_g_ps14_ak_ft_ckpt_7_clean.pth --local-dir /workspace/deepcheat/VideoMAEv2; \
fi

# Copy and setup entrypoint script
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
8 changes: 8 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ -n "$MODEL_PATH" ]; then
ln -s "$MODEL_PATH/vit_g_ps14_ak_ft_ckpt_7_clean.pth" /workspace/deepcheat/VideoMAEv2/vit_g_ps14_ak_ft_ckpt_7_clean.pth
fi

echo "Running with model..."
exec python main.py