Syzygianinfern0 commited on
Commit
4758518
·
1 Parent(s): f9eab93

Refactor Docker setup and vLLM server configuration

Browse files

Moved vllm installation to Dockerfile.stormbase, updated dependency installation to use requirements.txt, and modified launch_space.sh to suppress output. Adjusted vllm_serve.sh parameters for improved memory management.

Dockerfile CHANGED
@@ -1,8 +1,5 @@
1
  FROM syzygianinfern0/stormbase:latest
2
 
3
- # Install vllm (move it to Dockerfile.stormbase and remove this line)
4
- RUN pip install vllm matplotlib
5
-
6
  # Set up a new user named "user" with user ID 1000
7
  RUN useradd -m -u 1000 user
8
 
 
1
  FROM syzygianinfern0/stormbase:latest
2
 
 
 
 
3
  # Set up a new user named "user" with user ID 1000
4
  RUN useradd -m -u 1000 user
5
 
Dockerfile.stormbase CHANGED
@@ -16,10 +16,12 @@ RUN apt-get update && apt-get install -y \
16
  # Set working directory
17
  WORKDIR /app
18
 
19
- # Upgrade pip
 
 
 
20
  RUN pip install --upgrade pip && \
21
- pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 && \
22
- pip install gradio transformers opencv-python decord joblib einops timm accelerate sentencepiece
23
 
24
  # ====== Precompile carl-storm ======
25
  WORKDIR /opt
 
16
  # Set working directory
17
  WORKDIR /app
18
 
19
+ # Copy requirements file
20
+ COPY requirements.txt .
21
+
22
+ # Upgrade pip and install dependencies
23
  RUN pip install --upgrade pip && \
24
+ pip install -r requirements.txt
 
25
 
26
  # ====== Precompile carl-storm ======
27
  WORKDIR /opt
environment_neusv.yml ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: neusv-public-1
2
+ channels:
3
+ - pytorch
4
+ - nvidia
5
+ - conda-forge
6
+ dependencies:
7
+ - _libgcc_mutex=0.1=conda_forge
8
+ - _openmp_mutex=4.5=2_kmp_llvm
9
+ - aom=3.6.1=h59595ed_0
10
+ - blas=2.116=mkl
11
+ - blas-devel=3.9.0=16_linux64_mkl
12
+ - brotli-python=1.1.0=py310hf71b8c6_2
13
+ - bzip2=1.0.8=h4bc722e_7
14
+ - ca-certificates=2024.8.30=hbcca054_0
15
+ - certifi=2024.8.30=pyhd8ed1ab_0
16
+ - cffi=1.17.1=py310h8deb56e_0
17
+ - charset-normalizer=3.4.0=pyhd8ed1ab_1
18
+ - cpython=3.10.16=py310hd8ed1ab_1
19
+ - cuda-cudart=12.4.127=0
20
+ - cuda-cupti=12.4.127=0
21
+ - cuda-libraries=12.4.1=0
22
+ - cuda-nvrtc=12.4.127=0
23
+ - cuda-nvtx=12.4.127=0
24
+ - cuda-opencl=12.6.77=0
25
+ - cuda-runtime=12.4.1=0
26
+ - cuda-version=12.6=3
27
+ - ffmpeg=4.4.2=gpl_hdf48244_113
28
+ - filelock=3.16.1=pyhd8ed1ab_1
29
+ - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
30
+ - font-ttf-inconsolata=3.000=h77eed37_0
31
+ - font-ttf-source-code-pro=2.038=h77eed37_0
32
+ - font-ttf-ubuntu=0.83=h77eed37_3
33
+ - fontconfig=2.15.0=h7e30c49_1
34
+ - fonts-conda-ecosystem=1=0
35
+ - fonts-conda-forge=1=0
36
+ - freetype=2.12.1=h267a509_2
37
+ - gettext=0.22.5=he02047a_3
38
+ - gettext-tools=0.22.5=he02047a_3
39
+ - giflib=5.2.2=hd590300_0
40
+ - gmp=6.3.0=hac33072_2
41
+ - gmpy2=2.1.5=py310he8512ff_3
42
+ - gnutls=3.7.9=hb077bed_0
43
+ - h2=4.1.0=pyhd8ed1ab_1
44
+ - hpack=4.0.0=pyhd8ed1ab_1
45
+ - hyperframe=6.0.1=pyhd8ed1ab_1
46
+ - idna=3.10=pyhd8ed1ab_1
47
+ - jinja2=3.1.4=pyhd8ed1ab_1
48
+ - lame=3.100=h166bdaf_1003
49
+ - lcms2=2.16=hb7c19ff_0
50
+ - ld_impl_linux-64=2.43=h712a8e2_2
51
+ - lerc=4.0.0=h27087fc_0
52
+ - libasprintf=0.22.5=he8f35ee_3
53
+ - libasprintf-devel=0.22.5=he8f35ee_3
54
+ - libblas=3.9.0=16_linux64_mkl
55
+ - libcblas=3.9.0=16_linux64_mkl
56
+ - libcublas=12.4.5.8=0
57
+ - libcufft=11.2.1.3=0
58
+ - libcufile=1.11.1.6=0
59
+ - libcurand=10.3.7.77=0
60
+ - libcusolver=11.6.1.9=0
61
+ - libcusparse=12.3.1.170=0
62
+ - libdeflate=1.22=hb9d3cd8_0
63
+ - libdrm=2.4.124=hb9d3cd8_0
64
+ - libegl=1.7.0=ha4b6fd6_2
65
+ - libexpat=2.6.4=h5888daf_0
66
+ - libffi=3.4.2=h7f98852_5
67
+ - libgcc=14.2.0=h77fa898_1
68
+ - libgcc-ng=14.2.0=h69a702a_1
69
+ - libgettextpo=0.22.5=he02047a_3
70
+ - libgettextpo-devel=0.22.5=he02047a_3
71
+ - libgfortran=14.2.0=h69a702a_1
72
+ - libgfortran-ng=14.2.0=h69a702a_1
73
+ - libgfortran5=14.2.0=hd5240d6_1
74
+ - libgl=1.7.0=ha4b6fd6_2
75
+ - libglvnd=1.7.0=ha4b6fd6_2
76
+ - libglx=1.7.0=ha4b6fd6_2
77
+ - libgomp=14.2.0=h77fa898_1
78
+ - libhwloc=2.11.2=default_h0d58e46_1001
79
+ - libiconv=1.17=hd590300_2
80
+ - libidn2=2.3.7=hd590300_0
81
+ - libjpeg-turbo=3.0.0=hd590300_1
82
+ - liblapack=3.9.0=16_linux64_mkl
83
+ - liblapacke=3.9.0=16_linux64_mkl
84
+ - liblzma=5.6.3=hb9d3cd8_1
85
+ - libnpp=12.2.5.30=0
86
+ - libnsl=2.0.1=hd590300_0
87
+ - libnvfatbin=12.6.77=0
88
+ - libnvjitlink=12.4.127=0
89
+ - libnvjpeg=12.3.1.117=0
90
+ - libpciaccess=0.18=hd590300_0
91
+ - libpng=1.6.44=hadc24fc_0
92
+ - libsqlite=3.47.0=hadc24fc_1
93
+ - libstdcxx=14.2.0=hc0a3c3a_1
94
+ - libstdcxx-ng=14.2.0=h4852527_1
95
+ - libtasn1=4.19.0=h166bdaf_0
96
+ - libtiff=4.7.0=hc4654cb_2
97
+ - libunistring=0.9.10=h7f98852_0
98
+ - libuuid=2.38.1=h0b41bf4_0
99
+ - libva=2.22.0=h8a09558_1
100
+ - libvpx=1.13.1=h59595ed_0
101
+ - libwebp=1.4.0=h2c329e2_0
102
+ - libwebp-base=1.4.0=hd590300_0
103
+ - libxcb=1.17.0=h8a09558_0
104
+ - libxcrypt=4.4.36=hd590300_1
105
+ - libxml2=2.13.5=h0d44e9d_1
106
+ - libzlib=1.3.1=hb9d3cd8_2
107
+ - llvm-openmp=15.0.7=h0cdce71_0
108
+ - mkl=2022.1.0=h84fe81f_915
109
+ - mkl-devel=2022.1.0=ha770c72_916
110
+ - mkl-include=2022.1.0=h84fe81f_915
111
+ - mpc=1.3.1=h24ddda3_1
112
+ - mpfr=4.2.1=h90cbb55_3
113
+ - mpmath=1.3.0=pyhd8ed1ab_1
114
+ - ncurses=6.5=he02047a_1
115
+ - nettle=3.9.1=h7ab15ed_0
116
+ - networkx=3.4.2=pyh267e887_2
117
+ - numpy=2.2.0=py310h5851e9f_0
118
+ - openh264=2.3.1=hcb278e6_2
119
+ - openjpeg=2.5.3=h5fbd93e_0
120
+ - openssl=3.4.0=hb9d3cd8_0
121
+ - p11-kit=0.24.1=hc5aa10d_0
122
+ - pip=24.3.1=pyh8b19718_0
123
+ - pthread-stubs=0.4=hb9d3cd8_1002
124
+ - pycparser=2.22=pyh29332c3_1
125
+ - pysocks=1.7.1=pyha55dd90_7
126
+ - python=3.10.16=he725a3c_1_cpython
127
+ - python_abi=3.10=5_cp310
128
+ - pytorch=2.5.1=py3.10_cuda12.4_cudnn9.1.0_0
129
+ - pytorch-cuda=12.4=hc786d27_7
130
+ - pytorch-mutex=1.0=cuda
131
+ - pyyaml=6.0.2=py310ha75aee5_1
132
+ - readline=8.2=h8228510_1
133
+ - requests=2.32.3=pyhd8ed1ab_1
134
+ - setuptools=75.6.0=pyhff2d567_1
135
+ - svt-av1=1.4.1=hcb278e6_0
136
+ - tbb=2021.13.0=hceb3a55_1
137
+ - tk=8.6.13=noxft_h4845f30_101
138
+ - torchaudio=2.5.1=py310_cu124
139
+ - torchtriton=3.1.0=py310
140
+ - torchvision=0.20.1=py310_cu124
141
+ - typing_extensions=4.12.2=pyha770c72_1
142
+ - urllib3=2.2.3=pyhd8ed1ab_1
143
+ - wayland=1.23.1=h3e06ad9_0
144
+ - wayland-protocols=1.37=hd8ed1ab_0
145
+ - wheel=0.45.1=pyhd8ed1ab_1
146
+ - x264=1!164.3095=h166bdaf_2
147
+ - x265=3.5=h924138e_3
148
+ - xorg-libx11=1.8.10=h4f16b4b_1
149
+ - xorg-libxau=1.0.11=hb9d3cd8_1
150
+ - xorg-libxdmcp=1.1.5=hb9d3cd8_0
151
+ - xorg-libxext=1.3.6=hb9d3cd8_0
152
+ - xorg-libxfixes=6.0.1=hb9d3cd8_0
153
+ - yaml=0.2.5=h7f98852_2
154
+ - zstandard=0.23.0=py310ha39cb0e_1
155
+ - zstd=1.5.6=ha6fb4c9_0
156
+ - pip:
157
+ - accelerate==1.2.1
158
+ - aiofiles==23.2.1
159
+ - annotated-types==0.7.0
160
+ - anyio==4.7.0
161
+ - click==8.1.7
162
+ - contourpy==1.3.1
163
+ - cycler==0.12.1
164
+ - decorator==4.4.2
165
+ - decord==0.6.0
166
+ - distro==1.9.0
167
+ - einops==0.8.0
168
+ - exceptiongroup==1.2.2
169
+ - fastapi==0.115.6
170
+ - ffmpy==0.4.0
171
+ - fonttools==4.57.0
172
+ - fsspec==2024.10.0
173
+ - gradio==5.9.0
174
+ - gradio-client==1.5.2
175
+ - h11==0.14.0
176
+ - httpcore==1.0.7
177
+ - httpx==0.28.1
178
+ - huggingface-hub==0.26.5
179
+ - imageio==2.37.0
180
+ - imageio-ffmpeg==0.6.0
181
+ - jiter==0.9.0
182
+ - joblib==1.4.2
183
+ - kiwisolver==1.4.8
184
+ - markdown-it-py==3.0.0
185
+ - markupsafe==2.1.5
186
+ - matplotlib==3.10.1
187
+ - mdurl==0.1.2
188
+ - moviepy==1.0.3
189
+ - openai==1.70.0
190
+ - opencv-python==4.10.0.84
191
+ - orjson==3.10.12
192
+ - packaging==24.2
193
+ - pandas==2.2.3
194
+ - pillow==10.4.0
195
+ - proglog==0.1.10
196
+ - psutil==6.1.1
197
+ - pycarl==2.3.0
198
+ - pydantic==2.10.3
199
+ - pydantic-core==2.27.1
200
+ - pydub==0.25.1
201
+ - pygments==2.18.0
202
+ - pyparsing==3.2.3
203
+ - python-dateutil==2.9.0.post0
204
+ - python-dotenv==1.0.1
205
+ - python-multipart==0.0.19
206
+ - pytz==2024.2
207
+ - regex==2024.11.6
208
+ - rich==13.9.4
209
+ - ruff==0.8.3
210
+ - safehttpx==0.1.6
211
+ - safetensors==0.4.5
212
+ - semantic-version==2.10.0
213
+ - sentencepiece==0.2.0
214
+ - shellingham==1.5.4
215
+ - six==1.17.0
216
+ - sniffio==1.3.1
217
+ - starlette==0.41.3
218
+ - stormpy==1.9.0
219
+ - sympy==1.13.1
220
+ - timm==1.0.13
221
+ - tokenizers==0.21.0
222
+ - tomlkit==0.13.2
223
+ - tqdm==4.67.1
224
+ - transformers==4.47.0
225
+ - typer==0.15.1
226
+ - tzdata==2024.2
227
+ - uvicorn==0.32.1
228
+ - websockets==14.1
229
+ prefix: /home/ss99569/mambaforge/envs/neusv-public-1
launch_space.sh CHANGED
@@ -1,7 +1,7 @@
1
  #!/bin/bash
2
 
3
  # Start vLLM server in background
4
- ./vllm_serve.sh &
5
 
6
  # Wait briefly to ensure vLLM is up before Gradio tries to connect
7
  sleep 60
 
1
  #!/bin/bash
2
 
3
  # Start vLLM server in background
4
+ ./vllm_serve.sh > /dev/null 2>&1 &
5
 
6
  # Wait briefly to ensure vLLM is up before Gradio tries to connect
7
  sleep 60
requirements.txt ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PyTorch packages
2
+ --index-url https://download.pytorch.org/whl/cu124
3
+ torch==2.4.0
4
+ torchvision==0.19.0
5
+ torchaudio==2.4.0
6
+
7
+ # Other packages
8
+ --index-url https://pypi.org/simple
9
+ gradio==5.9.0
10
+ transformers==4.47.0
11
+ opencv-python==4.10.0.84
12
+ decord==0.6.0
13
+ joblib==1.4.2
14
+ einops==0.8.0
15
+ timm==1.0.13
16
+ accelerate==1.2.1
17
+ sentencepiece==0.2.0
18
+ vllm==0.6.3.post1
19
+ matplotlib==3.10.1
vllm_serve.sh CHANGED
@@ -1,14 +1,14 @@
1
  #!/bin/bash
2
 
3
  MODEL="OpenGVLab/InternVL2_5-8B"
4
- export CUDA_DEVICE_ORDER="PCI_BUS_ID"
5
- export NCCL_P2P_DISABLE=1
6
- export CUDA_VISIBLE_DEVICES="0"
7
- export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
8
  PORT=8000
9
  vllm serve $MODEL \
10
  --port $PORT \
11
  --trust-remote-code \
12
  --limit-mm-per-prompt image=4 \
13
- # --enforce-eager \
14
- # --max-model-len 16384
 
1
  #!/bin/bash
2
 
3
  MODEL="OpenGVLab/InternVL2_5-8B"
4
+ # export CUDA_DEVICE_ORDER="PCI_BUS_ID"
5
+ # export NCCL_P2P_DISABLE=1
6
+ # export CUDA_VISIBLE_DEVICES="0"
7
+ # export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
8
  PORT=8000
9
  vllm serve $MODEL \
10
  --port $PORT \
11
  --trust-remote-code \
12
  --limit-mm-per-prompt image=4 \
13
+ --max-model-len 8192 \
14
+ --gpu-memory-utilization 0.97