SoccerChat / Dockerfile
SushantGautam's picture
Update Dockerfile
baf79a8 verified
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git ffmpeg python3-pip python3-dev gcc && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade pip
RUN pip3 install --no-cache-dir \
ms-swift bitsandbytes decord qwen-vl-utils gradio hf_transfer
ENV GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_SERVER_PORT=7860 \
HF_HUB_ENABLE_HF_TRANSFER=1
ENV FPS_MIN_FRAMES=24 \
FPS_MAX_FRAMES=24 \
VIDEO_MAX_PIXELS=100352 \
HF_HOME=/tmp/huggingface
RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME
RUN python3 - <<'PY'
from huggingface_hub import snapshot_download
snapshot_download("Qwen/Qwen2-VL-7B-Instruct")
snapshot_download("SimulaMet/SoccerChat-qwen2-vl-7b")
PY
EXPOSE 7860
RUN mkdir -p /.cache && \
chmod -R 777 /.cache && chmod -R 777 /root/.cache
RUN
CMD swift app \
--adapters "SimulaMet/SoccerChat-qwen2-vl-7b" \
--model "Qwen/Qwen2-VL-7B-Instruct" \
--use_hf true \
--attn_impl sdpa \
--quant_method bnb --quant_bits 4 \
--bnb_4bit_quant_type nf4 \
--bnb_4bit_use_double_quant true \
--bnb_4bit_compute_dtype float16 \
--max_batch_size 1 \
--is_multimodal true \
--studio_title "SoccerChat" \
--stream true \
--server_name 0.0.0.0 --server_port 7860 --share false --lang en