File tree Expand file tree Collapse file tree 4 files changed +311
-12
lines changed
supporting-blog-content/building-multimodal-rag-with-elasticsearch-gotham Expand file tree Collapse file tree 4 files changed +311
-12
lines changed Original file line number Diff line number Diff line change 1+ FROM ubuntu:24.04
2+
3+ # Install necessary packages
4+ RUN apt update && apt install -y --no-install-recommends \
5+ python3 \
6+ python3-pip \
7+ python3-venv \
8+ g++ \
9+ gcc \
10+ python3.12-dev
11+
12+ # Create and activate a virtual environment
13+ RUN python3 -m venv /opt/venv
14+ ENV PATH="/opt/venv/bin:$PATH"
15+
16+ # Install Python packages in the virtual environment
17+ RUN pip install --upgrade pip
18+ RUN pip install torch
19+ RUN pip install wheel setuptools
20+ RUN pip install transformers xformers
Original file line number Diff line number Diff line change @@ -21,6 +21,22 @@ The pipeline demonstrates how to:
2121
22221 . ** Setup Environment**
2323``` bash
24+ rm -rf .venv requirements.txt
25+ python3 -m venv .venv
26+ source .venv/bin/activate
27+ pip install pip-tools
28+ # Recreate requirements.txt
29+ pip-compile
30+ # Install main dependencies
31+ pip install -r requirements.txt
32+
33+
34+
35+ python3 -m venv .venv
36+ source .venv/bin/activate
37+ pip install " python-dotenv[cli]"
38+ pip install -r requirements-torch.txt
39+ pip install -r requirements.txt
2440
2541# Make sure you have pytorch installed and Python 3.10+
2642pip install torch torchvision torchaudio
Original file line number Diff line number Diff line change 1+ elasticsearch
2+ torch
3+ torchvision
4+ torchaudio
5+ imagebind @ git+https://github.com/hkchengrex/ImageBind.git
6+ openai
7+ python-dotenv
8+ numpy
9+ pillow
10+ opencv-python
11+ librosa
12+ matplotlib
13+ wheel
14+ setuptools
15+ xformers
Original file line number Diff line number Diff line change 1- elasticsearch >= 8.11.0
2- torch >= 2.1.0
3- torchvision >= 0.16.0
4- torchaudio >= 2.1.0
1+ #
2+ # This file is autogenerated by pip-compile with Python 3.12
3+ # by the following command:
4+ #
5+ # pip-compile
6+ #
7+ annotated-types == 0.7.0
8+ # via pydantic
9+ anyio == 4.8.0
10+ # via
11+ # httpx
12+ # openai
13+ audioread == 3.0.1
14+ # via librosa
15+ av == 14.1.0
16+ # via pytorchvideo
17+ cartopy == 0.24.1
18+ # via imagebind
19+ certifi == 2025.1.31
20+ # via
21+ # elastic-transport
22+ # httpcore
23+ # httpx
24+ # pyproj
25+ # requests
26+ cffi == 1.17.1
27+ # via soundfile
28+ charset-normalizer == 3.4.1
29+ # via requests
30+ contourpy == 1.3.1
31+ # via matplotlib
32+ cycler == 0.12.1
33+ # via matplotlib
34+ decorator == 5.2.1
35+ # via librosa
36+ distro == 1.9.0
37+ # via openai
38+ einops == 0.8.1
39+ # via imagebind
40+ elastic-transport == 8.17.0
41+ # via elasticsearch
42+ elasticsearch == 8.17.1
43+ # via -r requirements.in
44+ filelock == 3.17.0
45+ # via
46+ # huggingface-hub
47+ # torch
48+ fonttools == 4.56.0
49+ # via matplotlib
50+ fsspec == 2025.2.0
51+ # via
52+ # huggingface-hub
53+ # torch
54+ ftfy == 6.3.1
55+ # via imagebind
56+ fvcore == 0.1.5.post20221221
57+ # via
58+ # imagebind
59+ # pytorchvideo
60+ h11 == 0.14.0
61+ # via httpcore
62+ httpcore == 1.0.7
63+ # via httpx
64+ httpx == 0.28.1
65+ # via openai
66+ huggingface-hub == 0.29.1
67+ # via timm
68+ idna == 3.10
69+ # via
70+ # anyio
71+ # httpx
72+ # requests
573imagebind @ git+https://github.com/hkchengrex/ImageBind.git
6- openai >= 1.0.0
7- python-dotenv >= 1.0.0
8- numpy >= 1.24.0
9- pillow >= 10.0.0
10- opencv-python >= 4.8.0
11- librosa >= 0.10.0
12- matplotlib >= 3.7.0
13- xformers >= 0.0.23 # Adicione esta linha
74+ # via -r requirements.in
75+ iopath == 0.1.10
76+ # via
77+ # fvcore
78+ # imagebind
79+ # pytorchvideo
80+ jinja2 == 3.1.5
81+ # via torch
82+ jiter == 0.8.2
83+ # via openai
84+ joblib == 1.4.2
85+ # via
86+ # librosa
87+ # scikit-learn
88+ kiwisolver == 1.4.8
89+ # via matplotlib
90+ lazy-loader == 0.4
91+ # via librosa
92+ librosa == 0.10.2.post1
93+ # via -r requirements.in
94+ llvmlite == 0.44.0
95+ # via numba
96+ markupsafe == 3.0.2
97+ # via jinja2
98+ matplotlib == 3.10.0
99+ # via
100+ # -r requirements.in
101+ # cartopy
102+ # imagebind
103+ mpmath == 1.3.0
104+ # via sympy
105+ msgpack == 1.1.0
106+ # via librosa
107+ networkx == 3.4.2
108+ # via
109+ # pytorchvideo
110+ # torch
111+ numba == 0.61.0
112+ # via librosa
113+ numpy == 2.1.3
114+ # via
115+ # -r requirements.in
116+ # cartopy
117+ # contourpy
118+ # fvcore
119+ # imagebind
120+ # librosa
121+ # matplotlib
122+ # numba
123+ # opencv-python
124+ # scikit-learn
125+ # scipy
126+ # shapely
127+ # soundfile
128+ # soxr
129+ # torchvision
130+ openai == 1.64.0
131+ # via -r requirements.in
132+ opencv-python == 4.11.0.86
133+ # via -r requirements.in
134+ packaging == 24.2
135+ # via
136+ # cartopy
137+ # huggingface-hub
138+ # lazy-loader
139+ # matplotlib
140+ # pooch
141+ parameterized == 0.9.0
142+ # via pytorchvideo
143+ pillow == 11.1.0
144+ # via
145+ # -r requirements.in
146+ # fvcore
147+ # matplotlib
148+ # torchvision
149+ platformdirs == 4.3.6
150+ # via pooch
151+ pooch == 1.8.2
152+ # via librosa
153+ portalocker == 3.1.1
154+ # via iopath
155+ pycparser == 2.22
156+ # via cffi
157+ pydantic == 2.10.6
158+ # via openai
159+ pydantic-core == 2.27.2
160+ # via pydantic
161+ pyparsing == 3.2.1
162+ # via matplotlib
163+ pyproj == 3.7.1
164+ # via cartopy
165+ pyshp == 2.3.1
166+ # via cartopy
167+ python-dateutil == 2.9.0.post0
168+ # via matplotlib
169+ python-dotenv == 1.0.1
170+ # via -r requirements.in
171+ pytorchvideo @ git+https://github.com/facebookresearch/pytorchvideo.git@ae9cfc6e62ca49eb9721a7a56e1e13e348ad21dc
172+ # via imagebind
173+ pyyaml == 6.0.2
174+ # via
175+ # fvcore
176+ # huggingface-hub
177+ # timm
178+ # yacs
179+ regex == 2024.11.6
180+ # via imagebind
181+ requests == 2.32.3
182+ # via
183+ # huggingface-hub
184+ # pooch
185+ safetensors == 0.5.2
186+ # via timm
187+ scikit-learn == 1.6.1
188+ # via librosa
189+ scipy == 1.15.2
190+ # via
191+ # librosa
192+ # scikit-learn
193+ shapely == 2.0.7
194+ # via cartopy
195+ six == 1.17.0
196+ # via python-dateutil
197+ sniffio == 1.3.1
198+ # via
199+ # anyio
200+ # openai
201+ soundfile == 0.13.1
202+ # via librosa
203+ soxr == 0.5.0.post1
204+ # via librosa
205+ sympy == 1.13.1
206+ # via torch
207+ tabulate == 0.9.0
208+ # via fvcore
209+ termcolor == 2.5.0
210+ # via fvcore
211+ threadpoolctl == 3.5.0
212+ # via scikit-learn
213+ timm == 1.0.15
214+ # via imagebind
215+ torch == 2.6.0
216+ # via
217+ # -r requirements.in
218+ # imagebind
219+ # timm
220+ # torchaudio
221+ # torchvision
222+ torchaudio == 2.6.0
223+ # via
224+ # -r requirements.in
225+ # imagebind
226+ torchvision == 0.21.0
227+ # via
228+ # -r requirements.in
229+ # imagebind
230+ # timm
231+ tqdm == 4.67.1
232+ # via
233+ # fvcore
234+ # huggingface-hub
235+ # iopath
236+ # openai
237+ types-regex == 2024.11.6.20241221
238+ # via imagebind
239+ typing-extensions == 4.12.2
240+ # via
241+ # anyio
242+ # huggingface-hub
243+ # iopath
244+ # librosa
245+ # openai
246+ # pydantic
247+ # pydantic-core
248+ # torch
249+ urllib3 == 2.3.0
250+ # via
251+ # elastic-transport
252+ # requests
253+ wcwidth == 0.2.13
254+ # via ftfy
255+ wheel == 0.45.1
256+ # via -r requirements.in
257+ yacs == 0.1.8
258+ # via fvcore
259+
260+ # The following packages are considered to be unsafe in a requirements file:
261+ # setuptools
You can’t perform that action at this time.
0 commit comments