Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H2ogpte #1760

Draft
wants to merge 665 commits into
base: main
Choose a base branch
from
Draft

H2ogpte #1760

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
665 commits
Select commit Hold shift + click to select a range
11a4827
Resolve
pseudotensor Aug 21, 2024
96b3a3b
Resolve
pseudotensor Aug 21, 2024
c726786
Resolve
pseudotensor Aug 21, 2024
411fb8d
Resolve
pseudotensor Aug 21, 2024
90387a0
Resolve
pseudotensor Aug 23, 2024
f9757db
Resolve
pseudotensor Aug 23, 2024
e320ff8
Merge branch 'main' into h2ogpte
pseudotensor Aug 23, 2024
0f0eca1
Resolve
pseudotensor Aug 24, 2024
d03c7b6
Resolve
pseudotensor Aug 24, 2024
22deff9
Resolve
pseudotensor Aug 25, 2024
27a4759
Resolve
pseudotensor Aug 25, 2024
f827494
Resolve
pseudotensor Aug 25, 2024
c3350c1
Resolve
pseudotensor Aug 25, 2024
c7e19d8
Resolve
pseudotensor Aug 25, 2024
f7cc0b0
Resolve
pseudotensor Aug 25, 2024
ec95766
Resolve
pseudotensor Aug 26, 2024
1be0a77
Resolve
pseudotensor Aug 26, 2024
581bf52
Resolve
pseudotensor Aug 26, 2024
998ca65
Resolve
pseudotensor Aug 27, 2024
946dc45
Merge branch 'main' into h2ogpte
pseudotensor Aug 27, 2024
b02eff0
Resolve
pseudotensor Aug 28, 2024
c00135b
Merge branch 'main' into h2ogpte
pseudotensor Aug 28, 2024
2d7037b
Resolve
pseudotensor Aug 28, 2024
806cadf
Resolve
pseudotensor Aug 28, 2024
60912f9
Resolve
pseudotensor Aug 28, 2024
c65da40
Resolve
pseudotensor Aug 29, 2024
2287741
Resolve
pseudotensor Aug 30, 2024
ec573c4
Resolve
pseudotensor Aug 30, 2024
395eec3
Resolve
pseudotensor Aug 30, 2024
98f9634
Resolve
pseudotensor Aug 30, 2024
5b17562
Resolve
pseudotensor Aug 30, 2024
dd3da27
Resolve
pseudotensor Aug 30, 2024
490cb43
Resolve
pseudotensor Aug 30, 2024
537fe6c
Resolve
pseudotensor Aug 31, 2024
ec2ac68
Resolve
pseudotensor Aug 31, 2024
3bdb4ba
Resolve
pseudotensor Aug 31, 2024
17ef632
Resolve
pseudotensor Aug 31, 2024
ae5200f
Resolve
pseudotensor Sep 1, 2024
5e6dffa
Resolve
pseudotensor Sep 1, 2024
6aba5a8
Resolve
pseudotensor Sep 1, 2024
6e53699
Resolve
pseudotensor Sep 1, 2024
a644891
Resolve
pseudotensor Sep 1, 2024
fa41b4f
Resolve
pseudotensor Sep 1, 2024
277e02b
Resolve
pseudotensor Sep 1, 2024
1c93782
Resolve
pseudotensor Sep 1, 2024
1a4c994
Resolve
pseudotensor Sep 2, 2024
35c663b
Maybe Fixes https://github.com/h2oai/h2ogpte/issues/3367
pseudotensor Sep 2, 2024
680d86f
Try fontconfig
pseudotensor Sep 2, 2024
d671e23
Resolve
pseudotensor Sep 3, 2024
e375608
Resolve
pseudotensor Sep 4, 2024
bb9edaf
Resolve
pseudotensor Sep 4, 2024
a0cdd1a
Resolve
pseudotensor Sep 4, 2024
4c53a85
Resolve
pseudotensor Sep 4, 2024
4a368eb
Resolve
pseudotensor Sep 4, 2024
498a0a5
Merge remote-tracking branch 'origin/main' into h2ogpte
arnocandel Sep 5, 2024
fa16f49
Resolve
pseudotensor Sep 5, 2024
29c8808
Resolve
pseudotensor Sep 5, 2024
fdffa64
Resolve
pseudotensor Sep 5, 2024
96f0052
Resolve
pseudotensor Sep 5, 2024
bf6787c
h2ogpte has pymupdf license
pseudotensor Sep 5, 2024
209eeee
Resolve
pseudotensor Sep 6, 2024
d0de95a
fix
pseudotensor Sep 6, 2024
b78177e
Resolve
pseudotensor Sep 6, 2024
d159414
Merge branch 'main' into h2ogpte
pseudotensor Sep 7, 2024
d066b2a
Resolve
pseudotensor Sep 7, 2024
a0c9df5
Resolve
pseudotensor Sep 7, 2024
da9aaeb
Resolve
pseudotensor Sep 7, 2024
f5586f6
Resolve
pseudotensor Sep 7, 2024
d71810e
Resolve
pseudotensor Sep 7, 2024
d900505
Resolve
pseudotensor Sep 7, 2024
b313e20
Resolve
pseudotensor Sep 10, 2024
35e04ae
Don't let LLM think it can interpret python code output before runnin…
pseudotensor Sep 10, 2024
1ad572b
Resolve
pseudotensor Sep 11, 2024
4955986
Resolve
pseudotensor Sep 11, 2024
729b5fb
Resolve
pseudotensor Sep 12, 2024
c87f35a
Resolve
pseudotensor Sep 12, 2024
9eb8782
Resolve
pseudotensor Sep 13, 2024
26b0c67
Resolve
pseudotensor Sep 13, 2024
eb32012
Resolve
pseudotensor Sep 13, 2024
4d08bd1
Resolve
pseudotensor Sep 13, 2024
ff48c45
Resolve
pseudotensor Sep 13, 2024
89a4c9a
Resolve
pseudotensor Sep 13, 2024
2e2edbb
Resolve
pseudotensor Sep 15, 2024
3d4c607
Resolve
pseudotensor Sep 19, 2024
55eca3e
resolve
pseudotensor Sep 19, 2024
8d24545
Resolve
pseudotensor Sep 20, 2024
1bfc580
Resolve
pseudotensor Sep 20, 2024
3c7abff
Resolve
pseudotensor Sep 20, 2024
7a8872b
Resolve
pseudotensor Sep 20, 2024
f74f864
Resolve
pseudotensor Sep 20, 2024
a81b8ad
Resolve
pseudotensor Sep 20, 2024
35546ef
resolve
pseudotensor Sep 21, 2024
c40ab5d
Resolve
pseudotensor Sep 21, 2024
a44bc8f
Resolve
pseudotensor Sep 23, 2024
8c495ce
Resolve
pseudotensor Sep 23, 2024
6152667
Resolve
pseudotensor Sep 23, 2024
a793e8b
Resolve
pseudotensor Sep 26, 2024
1bf8697
Resolve
pseudotensor Sep 26, 2024
590ecec
Resolve
pseudotensor Sep 26, 2024
52a0f64
Resolve
pseudotensor Sep 26, 2024
147ab44
Resolve
pseudotensor Sep 27, 2024
9637601
Resolve
pseudotensor Sep 27, 2024
747b395
Resolve
pseudotensor Sep 27, 2024
2ada9c6
Resolve
pseudotensor Sep 27, 2024
d7111cd
Resolve
pseudotensor Sep 28, 2024
e490b19
Resolve
pseudotensor Sep 28, 2024
259eaee
Resolve
pseudotensor Sep 28, 2024
d0b4ed4
Resolve
pseudotensor Sep 29, 2024
8ec8478
Resolve
pseudotensor Sep 29, 2024
e9190e6
Resolve
pseudotensor Sep 29, 2024
06f7269
Fix
pseudotensor Sep 29, 2024
e928771
Resolve
pseudotensor Sep 29, 2024
71e22ed
Resolve
pseudotensor Sep 29, 2024
12a5b1b
Resolve
pseudotensor Sep 29, 2024
6571f45
Resolve
pseudotensor Sep 29, 2024
0207357
Resolve
pseudotensor Sep 29, 2024
950fbb8
Resolve
pseudotensor Sep 30, 2024
182758a
Merge branch 'main' into h2ogpte
pseudotensor Oct 1, 2024
98f455b
Resolve
pseudotensor Oct 3, 2024
eace915
Resolve
pseudotensor Oct 4, 2024
8397b3c
Resolve
pseudotensor Oct 4, 2024
83520f0
resolve
pseudotensor Oct 4, 2024
4223acc
Resolve
pseudotensor Oct 4, 2024
ebd0eeb
Update wolfi packages
pseudotensor Oct 4, 2024
7196052
reorder
pseudotensor Oct 4, 2024
1d5181f
reduce
pseudotensor Oct 4, 2024
96d6c4d
reduce
pseudotensor Oct 4, 2024
ad89ecc
Resolve
pseudotensor Oct 4, 2024
16ead6c
Resolve
pseudotensor Oct 4, 2024
ee570a9
Resolve
pseudotensor Oct 4, 2024
1685604
resolve
pseudotensor Oct 5, 2024
5cc410e
move back
pseudotensor Oct 5, 2024
5f9d199
Resolve
pseudotensor Oct 5, 2024
9558e9b
Resolve
pseudotensor Oct 5, 2024
dd37968
Resolve
pseudotensor Oct 5, 2024
8049d4d
Resolve
pseudotensor Oct 5, 2024
3459687
Resolve
pseudotensor Oct 5, 2024
097f8d5
Add youtube (and other sites) video helper
pseudotensor Oct 6, 2024
7da70cd
Resolve
pseudotensor Oct 6, 2024
91efd05
Resolve
pseudotensor Oct 6, 2024
a878305
Fix
pseudotensor Oct 6, 2024
d1d9d03
Resolve
pseudotensor Oct 6, 2024
b396af5
Resolve
pseudotensor Oct 6, 2024
11e59d3
Resolve
pseudotensor Oct 6, 2024
2590c32
Resolve
pseudotensor Oct 6, 2024
a5d5698
Resolve
pseudotensor Oct 6, 2024
9a45c6e
Resolve
pseudotensor Oct 6, 2024
16c11f2
Resolve
pseudotensor Oct 6, 2024
8b6dfca
Resolve
pseudotensor Oct 6, 2024
0261839
Resolve
pseudotensor Oct 6, 2024
011a0ea
Resolve
pseudotensor Oct 6, 2024
45a5776
resolve
pseudotensor Oct 8, 2024
5402fe4
resolve
pseudotensor Oct 8, 2024
47ee4c4
Resolve
pseudotensor Oct 8, 2024
35f2a44
Resolve
pseudotensor Oct 9, 2024
f8fc5d8
Resolve
pseudotensor Oct 9, 2024
aebb16d
Resolve
pseudotensor Oct 9, 2024
c902871
Resolve
pseudotensor Oct 9, 2024
0859838
Resolve
pseudotensor Oct 9, 2024
324a31b
Resolve
pseudotensor Oct 9, 2024
60433f6
Resolve
pseudotensor Oct 9, 2024
b331c00
Resolve
pseudotensor Oct 10, 2024
c343608
Resolve
pseudotensor Oct 10, 2024
c8813a1
resolve
pseudotensor Oct 10, 2024
5d348f4
resolve
pseudotensor Oct 10, 2024
f670560
Resolve
pseudotensor Oct 10, 2024
82bb75f
Resolve
pseudotensor Oct 10, 2024
d33aad0
Resolve
pseudotensor Oct 11, 2024
e6b4ef4
Resolve
pseudotensor Oct 11, 2024
51d2c95
Resolve
pseudotensor Oct 11, 2024
dc25503
Resolve
pseudotensor Oct 11, 2024
352858e
Resolve
pseudotensor Oct 12, 2024
5feb3c3
Resolve
pseudotensor Oct 12, 2024
01bf02e
resolve
pseudotensor Oct 12, 2024
2f33a28
Resolve
pseudotensor Oct 16, 2024
af1614d
Merge branch 'main' into h2ogpte
pseudotensor Oct 17, 2024
ef0bf9b
Resolve
pseudotensor Oct 17, 2024
18e4a10
Resolve
pseudotensor Oct 17, 2024
926220b
Resolve
pseudotensor Oct 17, 2024
d9f43bf
Update Makefile to use vllm 0.6.2
achraf-mer Oct 18, 2024
4d763be
More updates to docker images
achraf-mer Oct 18, 2024
6b6634c
Use vllm 0.6.3.post1 with support for QwenVL
achraf-mer Oct 18, 2024
9f37c34
resolve
pseudotensor Oct 18, 2024
7c56986
Resolve
pseudotensor Oct 19, 2024
cc69e76
Resolve
pseudotensor Oct 19, 2024
57ac304
Resolve
pseudotensor Oct 19, 2024
00141a1
Resolve
pseudotensor Oct 19, 2024
8b1f7a8
Resolve
pseudotensor Oct 20, 2024
aa7b8e8
Resolve
pseudotensor Oct 20, 2024
c81c63a
Resolve
pseudotensor Oct 21, 2024
62aaecd
resolve
pseudotensor Oct 21, 2024
8738cad
resolve
pseudotensor Oct 22, 2024
d094bf7
Resolve
pseudotensor Oct 22, 2024
783a9b2
Resolve
pseudotensor Oct 22, 2024
6094ab9
resolve
pseudotensor Oct 22, 2024
1183553
Resolve
pseudotensor Oct 22, 2024
78f54f9
Resolve
pseudotensor Oct 22, 2024
c79439e
Resolve
pseudotensor Oct 22, 2024
499e42e
Resolve
pseudotensor Oct 22, 2024
cf74d57
Resolve
pseudotensor Oct 22, 2024
ec9e7bd
Resolve
pseudotensor Oct 22, 2024
58fb275
Resolve
pseudotensor Oct 23, 2024
507d3a5
Resolve
pseudotensor Oct 23, 2024
d170389
Resolve
pseudotensor Oct 24, 2024
d643d9d
Resolve
pseudotensor Oct 25, 2024
f40d3c0
Resolve
pseudotensor Oct 25, 2024
7ad5db0
resolve
pseudotensor Oct 26, 2024
c4600b0
Resolve
pseudotensor Oct 26, 2024
6b9dbf5
resolve
pseudotensor Oct 26, 2024
215c199
Resolve
pseudotensor Oct 26, 2024
ec53525
Resolve
pseudotensor Oct 26, 2024
d305e30
Resolve
pseudotensor Oct 27, 2024
f6ac24a
Resolve
pseudotensor Oct 27, 2024
843d9fe
Resolve
pseudotensor Oct 27, 2024
58a6b6f
Resolve
pseudotensor Oct 27, 2024
a866870
Resolve
pseudotensor Oct 27, 2024
2b2572b
Resolve
pseudotensor Oct 28, 2024
ce2817f
Resolve
pseudotensor Oct 29, 2024
79c90be
Resolve
pseudotensor Oct 29, 2024
8b473c0
Resolve
pseudotensor Oct 29, 2024
36deb00
Resolve
pseudotensor Oct 29, 2024
6f145c6
Resolve
pseudotensor Oct 29, 2024
25e937a
Resolve
pseudotensor Oct 29, 2024
ebaabd1
Resolve
pseudotensor Oct 30, 2024
9357b72
Resolve
pseudotensor Oct 30, 2024
bb38f57
Resolve
pseudotensor Oct 30, 2024
426e06c
Resolve
pseudotensor Oct 30, 2024
ea08016
Resolve
pseudotensor Oct 30, 2024
2edd8f8
resolve
pseudotensor Oct 30, 2024
beafddc
Resolve
pseudotensor Oct 30, 2024
6d2e66c
Resolve
pseudotensor Oct 30, 2024
dc4748c
Resolve
pseudotensor Oct 31, 2024
e2dac41
Resolve
pseudotensor Oct 31, 2024
5d02ac8
Resolve
pseudotensor Oct 31, 2024
5a8d993
Resolve
pseudotensor Oct 31, 2024
b575c39
Resolve
pseudotensor Oct 31, 2024
fcb1cf3
Resolve
pseudotensor Oct 31, 2024
2aa747c
resolve
pseudotensor Oct 31, 2024
32005ac
Resolve
pseudotensor Nov 1, 2024
16c7fd1
Resolve
pseudotensor Nov 1, 2024
93f91a7
Resolve
pseudotensor Nov 1, 2024
b920724
resolve
pseudotensor Nov 1, 2024
d3ade9d
Resolve
pseudotensor Nov 2, 2024
d513adb
Resolve
pseudotensor Nov 5, 2024
5c767ef
Resolve
pseudotensor Nov 6, 2024
45226a1
Resolve
pseudotensor Nov 6, 2024
57eeaf7
Resolve
pseudotensor Nov 6, 2024
00186dc
Resolve
pseudotensor Nov 7, 2024
d7b0fe7
Resolve
pseudotensor Nov 7, 2024
00a32b4
Resolve
pseudotensor Nov 20, 2024
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
120 changes: 101 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,46 +1,128 @@
# devel needed for bitsandbytes requirement of libcudart.so, otherwise runtime sufficient
FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu20.04
FROM gcr.io/vorvan/h2oai/h2ogpt-oss-wolfi-base:4 AS base-stage

ENV DEBIAN_FRONTEND=noninteractive

ENV PATH="/h2ogpt_conda/envs/h2ogpt/bin:${PATH}"
ARG PATH="/h2ogpt_conda/envs/h2ogpt/bin:${PATH}"
USER root

ENV HOME=/workspace
ENV CUDA_HOME=/usr/local/cuda-12.1
ENV VLLM_CACHE=/workspace/.vllm_cache
ENV TIKTOKEN_CACHE_DIR=/workspace/tiktoken_cache
ENV NUMBA_CACHE_DIR=/workspace/numba_cache
ENV HF_HUB_ENABLE_HF_TRANSFER=1

WORKDIR /workspace

COPY . /workspace/
FROM base-stage as intermediate-stage

## copy code
COPY . /workspace/

# copy build info
COPY build_info.txt /workspace/

RUN cd /workspace && ./docker_build_script_ubuntu.sh
# copy install script
COPY linux_install_wolfi.sh /workspace/

# run setup
RUN cd /workspace && ./linux_install_wolfi.sh

# mv to separate locations so can copy from under a enw docker layer
RUN \
mkdir -p /docker_cache && \
mv /usr/lib/python3.10/site-packages/nvidia /docker_cache/nvidia && \
mv /usr/lib/python3.10/site-packages/torch /docker_cache/torch && \
mv /usr/lib/python3.10/site-packages/onnxruntime /docker_cache/onnxruntime && \
mv /usr/lib/python3.10/site-packages/triton /docker_cache/triton && \
mv /usr/lib/python3.10 /docker_cache/python_data && \
cp -R /usr /docker_cache/user_data

# remove since already in base image and didn't change
RUN \
rm -rf /docker_cache/user_data/lib && \
rm -rf /docker_cache/user_data/libexec && \
rm -rf /docker_cache/user_data/local && \
rm -rf /docker_cache/user_data/bin/pandoc && \
rm -rf /docker_cache/user_data/bin/node && \
rm -rf /docker_cache/user_data/bin/lto-dump-11 && \
rm -rf /docker_cache/user_data/bin/lto-dump && \
rm -rf /docker_cache/user_data/share/misc/magic.mgc && \
rm -rf /docker_cache/user_data/share/icu && \
rm -rf /docker_cache/user_data/x86_64-pc-linux-gnu && \
rm -rf /docker_cache/python_data/site-packages/future/backports/test

# cleanup
RUN rm -rf /workspace/.cache && \
rm -rf /workspace/spaces && \
rm -rf /workspace/benchmarks && \
rm -rf /workspace/data && \
rm -rf /workspace/cloud && \
rm -rf /workspace/docs && \
rm -rf /workspace/helm && \
rm -rf /workspace/notebooks && \
rm -rf /workspace/papers

RUN mkdir -p /workspace/save

# make main workspace writable
RUN chmod -R a+rwx /workspace

ARG user=h2ogpt
ARG group=h2ogpt
ARG uid=1000
ARG gid=1000
FROM base-stage as final-stage

COPY --from=intermediate-stage /docker_cache/user_data /usr
COPY --from=intermediate-stage /docker_cache/python_data/ /usr/lib/python3.10/
COPY --from=intermediate-stage /docker_cache/nvidia/ /usr/lib/python3.10/site-packages/nvidia/
COPY --from=intermediate-stage /docker_cache/torch/ /usr/lib/python3.10/site-packages/torch/
COPY --from=intermediate-stage /docker_cache/onnxruntime/ /usr/lib/python3.10/site-packages/onnxruntime/
COPY --from=intermediate-stage /docker_cache/triton/ /usr/lib/python3.10/site-packages/triton/

RUN groupadd -g ${gid} ${group} && useradd -u ${uid} -g ${group} -s /bin/bash ${user}
# already exists in base image
# RUN groupadd -g ${gid} docker && useradd -u ${uid} -g ${group} -m ${user}
COPY --from=intermediate-stage /workspace/build_info.txt /build_info.txt
COPY --from=intermediate-stage /workspace /workspace
RUN chmod a+rwx /workspace # only for top dir, as docker COPY skips it.

# Add the user to the docker group
RUN usermod -aG docker ${user}
# Install Node.js, npm, and other necessary dependencies
RUN apk add --no-cache \
nodejs \
npm \
fontconfig \
git \
curl \
wget \
pandoc \
vim \
poppler-utils \
autoconf \
libtool \
docker \
zip \
unzip \
htop \
tree \
tmux \
jq \
net-tools \
nmap \
mtr \
rsync \
build-base \
parallel \
bc \
cronie \
screen \
inotify-tools \
xmlstarlet \
openssh

# Switch to the new user
USER ${user}
# Install Mermaid CLI globally
RUN npm install -g @mermaid-js/mermaid-cli

# Verify Mermaid CLI installation
RUN mmdc --version

EXPOSE 8888
EXPOSE 7860
EXPOSE 5000
EXPOSE 5002
EXPOSE 5004

USER h2ogpt

ENTRYPOINT ["python3.10"]
12 changes: 8 additions & 4 deletions docs/linux_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ else
fi
# Optional: PyMuPDF/ArXiv:
# Note!! that pymupdf is AGPL, requiring any source code be made available, but it's like GPL and too strong a constraint for general commercial use.
if [ "${GPLOK}" -eq "1" ]
then
pip install -r reqs_optional/requirements_optional_langchain.gpllike.txt -c reqs_optional/reqs_constraints.txt
fi
# h2oGPTe has license:
pip install -r reqs_optional/requirements_optional_langchain.gpllike.txt -c reqs_optional/reqs_constraints.txt

# Optional: FAISS
pip install -r reqs_optional/requirements_optional_gpu_only.txt -c reqs_optional/reqs_constraints.txt
# Optional: Selenium/PlayWright:
Expand Down Expand Up @@ -279,3 +278,8 @@ if [[ -z "${WOLFI_OS}" ]]; then
# pick version 11
fi
fi

if [[ -n "${WOLFI_OS}" ]]; then
# mitigate CVE-2024-22195, CVE-2024-34064
pip install jinja2==3.1.4 --no-cache-dir -c reqs_optional/reqs_constraints.txt
fi
4 changes: 2 additions & 2 deletions helm/h2ogpt-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ spec:
image: "{{ .Values.vllm.image.repository }}:{{ .Values.vllm.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.vllm.image.pullPolicy }}
command: ["python3"]
args:
args:
- "-m"
- "vllm.entrypoints.openai.api_server"
- "--port"
Expand Down Expand Up @@ -631,7 +631,7 @@ spec:
image: "{{ .Values.vllm.image.repository }}:{{ .Values.vllm.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.vllm.image.pullPolicy }}
command: ["python3"]
args:
args:
- "-m"
- "vllm.entrypoints.openai.api_server"
- "--port"
Expand Down
8 changes: 5 additions & 3 deletions helm/h2ogpt-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ h2ogpt:
replicaCount: 1
imagePullSecrets:
image:
repository: gcr.io/vorvan/h2oai/h2ogpt-runtime
repository: gcr.io/vorvan/h2oai/h2oai-h2ogpt-runtime
tag:
pullPolicy: IfNotPresent
initImage:
Expand Down Expand Up @@ -183,8 +183,10 @@ vllm:
replicaCount: 1

image:
repository: vllm/vllm-openai
tag: latest
repository: gcr.io/vorvan/h2oai/h2oai-h2ogpt-vllm
tag:
#repository: vllm/vllm-openai
#tag: latest
pullPolicy: IfNotPresent

podAffinity:
Expand Down
49 changes: 49 additions & 0 deletions linux_install_wolfi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash
set -o pipefail
set -ex

export WOLFI_OS=true

unset LLAMA_CUBLAS
unset CMAKE_ARGS
unset FORCE_CMAKE

export GGML_CUDA=1
export CMAKE_ARGS="-DGGML_CUDA=on -DCMAKE_CUDA_ARCHITECTURES=all -DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.1/bin/nvcc"
export FORCE_CMAKE=1

bash ./docs/linux_install.sh

# setup tiktoken cache
python3.10 -c "
import tiktoken
from tiktoken_ext import openai_public
# FakeTokenizer etc. needs tiktoken for general tasks
for enc in openai_public.ENCODING_CONSTRUCTORS:
encoding = tiktoken.get_encoding(enc)
model_encodings = [
'gpt-4',
'gpt-4-0314',
'gpt-4-32k',
'gpt-4-32k-0314',
'gpt-3.5-turbo',
'gpt-3.5-turbo-16k',
'gpt-3.5-turbo-0301',
'text-ada-001',
'ada',
'text-babbage-001',
'babbage',
'text-curie-001',
'curie',
'davinci',
'text-davinci-003',
'text-davinci-002',
'code-davinci-002',
'code-davinci-001',
'code-cushman-002',
'code-cushman-001'
]
for enc in model_encodings:
encoding = tiktoken.encoding_for_model(enc)
print('Done!')
"
30 changes: 30 additions & 0 deletions openai_server/agent_tools/download_youtube_video.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import argparse
import os


def download_video(url, output_dir='.'):
# Ensure the output directory exists
os.makedirs(output_dir, exist_ok=True)

ydl_opts = {
'format': 'mp4',
'outtmpl': os.path.join(output_dir, '%(title)s.%(ext)s'),
'restrictfilenames': True,
}

import yt_dlp
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])


def main():
parser = argparse.ArgumentParser(description="Download a video from a given URL (e.g. https://www.youtube.com/watch?v=2Njmx-UuU3M)")
parser.add_argument("--url", type=str, required=True, help="The URL of the video to download")
parser.add_argument("--output", type=str, default=".", help="The directory to save the downloaded video")
args = parser.parse_args()

download_video(url=args.url, output_dir=args.output)


if __name__ == "__main__":
main()
13 changes: 11 additions & 2 deletions reqs_optional/reqs_constraints.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# ensure doesn't drift, e.g. Issue #1348
torch==2.2.1; sys_platform != "darwin" and platform_machine != "arm64"
torch==2.3.1; sys_platform == "darwin" and platform_machine == "arm64"
gradio==4.44.0
gradio_client==1.3.0

gradio==3.50.2
gradio_client==0.6.1

# gradio==4.26.0
# gradio_client==0.15.1

# gradio==4.44.0
# gradio_client==1.3.0

transformers>=4.45.1

# https://github.com/langchain-ai/langchain/issues/22972
tenacity==8.3.0
pydantic==2.7.0
Expand Down
2 changes: 1 addition & 1 deletion reqs_optional/requirements_optional_langchain.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ weaviate-client==3.26.2
# vllm==0.2.2

# only gradio>=4
gradio_pdf>=0.0.7
#gradio_pdf>=0.0.7

gradio_tools>=0.0.9

Expand Down
10 changes: 7 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# no websockets, more cloud friendly
# able to make gradio clean-up states

gradio_clean @ https://h2o-release.s3.amazonaws.com/h2ogpt/gradio_clean-3.50.2-py3-none-any.whl
gradio_client==0.6.1

# gradio @ https://h2o-release.s3.amazonaws.com/h2ogpt/gradio-4.25.0-py3-none-any.whl
# gradio_client @ https://h2o-release.s3.amazonaws.com/h2ogpt/gradio_client-0.15.0-py3-none-any.whl

# gradio @ https://h2o-release.s3.amazonaws.com/h2ogpt/gradio-4.20.1-py3-none-any.whl
# gradio_client==0.11.0

#gradio @ https://h2o-release.s3.amazonaws.com/h2ogpt/gradio-4.20.1-py3-none-any.whl
#gradio_client==0.11.0
# gradio @ https://h2o-release.s3.amazonaws.com/h2ogpt/gradio-4.26.0-py3-none-any.whl
# gradio_client @ https://h2o-release.s3.amazonaws.com/h2ogpt/gradio_client-0.15.1-py3-none-any.whl

gradio==4.44.0
gradio_client==1.3.0

uvicorn[standard]
gunicorn
fastapi-utils
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "7a8e0c5236f6b39949223b70441212930953146e"
__version__ = "d7b0fe7efd0f587deef882e3dab1e9bd3f72de2a"
Loading