File tree Expand file tree Collapse file tree 5 files changed +18
-13
lines changed
comps/third_parties/video-llama/src Expand file tree Collapse file tree 5 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright (C) 2024 Intel Corporation
2
2
# SPDX-License-Identifier: Apache-2.0
3
3
4
- FROM python:3.9 -slim
4
+ FROM python:3.11 -slim
5
5
6
6
ENV LANG=C.UTF-8
7
7
@@ -30,9 +30,12 @@ RUN git clone ${VIDEO_LLAMA_REPO} Video-LLaMA && \
30
30
mv video_llama ../ && \
31
31
cd ../ && rm -rf Video-LLaMA
32
32
33
+ # Modify the degradations.py file to import rgb_to_grayscale from torchvision.transforms.functional
34
+ RUN sed -i 's/from torchvision.transforms.functional_tensor import rgb_to_grayscale/from torchvision.transforms.functional import rgb_to_grayscale/' /usr/local/lib/python3.11/site-packages/pytorchvideo/transforms/augmentations.py && \
35
+ sed -i 's/torchvision.transforms.functional_tensor/torchvision.transforms.v2.functional/' /usr/local/lib/python3.11/site-packages/pytorchvideo/transforms/augmentations.py
36
+
33
37
USER user
34
38
35
39
ENV PYTHONPATH=/home/user
36
40
37
-
38
41
ENTRYPOINT ["bash" , "start.sh" ]
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export ip_address=$(hostname -I | awk '{print $1}')
24
24
export no_proxy=$no_proxy ,${ip_address}
25
25
export LVM_ENDPOINT=http://${ip_address} :9009
26
26
# Start service
27
- docker compose -f comps/third_parties/llama-vision/deployment/docker_compose/docker_compose .yaml up -d
27
+ docker compose -f comps/third_parties/video-llama/src/docker_compose_vllama .yaml up -d
28
28
# it should take about 1.5 hours for the model to download in the video-llama server, assuming a maximum download speed of 100 Mbps
29
29
until docker logs lvm-video-llama 2>&1 | grep -q " Uvicorn running on" ; do
30
30
sleep 5m
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ services:
14
14
https_proxy : ${https_proxy}
15
15
no_proxy : ${no_proxy}
16
16
llm_download : " True"
17
+ healthcheck :
18
+ test : ["CMD-SHELL", "curl -f http://localhost:9009/v1/health_check || exit 1"]
19
+ interval : 10s
20
+ timeout : 5s
21
+ retries : 10
17
22
volumes :
18
23
- " /home/$USER/.cache:/home/user/.cache" # RECOMMENDED: use cache to avoid download
19
24
- video-llama-model:/home/user/model
Original file line number Diff line number Diff line change 12
12
langchain
13
13
langchain-community
14
14
langchain-core
15
- numpy == 1.26.4
15
+ numpy
16
16
omegaconf
17
17
opencv-python-headless
18
18
opentelemetry-api
@@ -26,12 +26,11 @@ sentence-transformers
26
26
sentencepiece
27
27
shortuuid
28
28
timm
29
- torch == 1.13 .1 --index-url https://download.pytorch.org/whl/cpu
30
- torchaudio == 0.13 .1 --index-url https://download.pytorch.org/whl/cpu
31
- torchvision == 0.14 .1 --index-url https://download.pytorch.org/whl/cpu
32
- transformers == 4.47.1
29
+ torch == 2.5 .1 --index-url https://download.pytorch.org/whl/cpu
30
+ torchaudio ~= 2.5 .1 --index-url https://download.pytorch.org/whl/cpu
31
+ torchvision == 0.20 .1 --index-url https://download.pytorch.org/whl/cpu
32
+ transformers
33
33
uvicorn
34
34
validators
35
35
webdataset
36
36
werkzeug
37
-
Original file line number Diff line number Diff line change @@ -15,20 +15,19 @@ function build_docker_images() {
15
15
cd $WORKPATH
16
16
echo $( pwd)
17
17
docker build --no-cache --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -t opea/lvm-video-llama:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/third_parties/video-llama/src/Dockerfile .
18
- if $? ; then
18
+ if [ $? -ne 0 ] ; then
19
19
echo " opea/lvm-video-llama built fail"
20
20
exit 1
21
21
else
22
22
echo " opea/lvm-video-llama built successful"
23
23
fi
24
24
docker build --no-cache --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -t opea/lvm:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/lvms/src/Dockerfile .
25
- if $? ; then
25
+ if [ $? -ne 0 ] ; then
26
26
echo " opea/lvm built fail"
27
27
exit 1
28
28
else
29
29
echo " opea/lvm built successful"
30
30
fi
31
-
32
31
}
33
32
34
33
function start_service() {
@@ -73,7 +72,6 @@ function main() {
73
72
74
73
stop_docker
75
74
echo y | docker system prune
76
-
77
75
}
78
76
79
77
main
You can’t perform that action at this time.
0 commit comments