Skip to content

Commit

Permalink
use pip for packages not available in channels
Browse files Browse the repository at this point in the history
  • Loading branch information
b08x committed Apr 9, 2024
1 parent 14f831d commit 3727972
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 36 deletions.
30 changes: 19 additions & 11 deletions llamaindex/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@ USER $NB_UID

WORKDIR /home/$NB_USER

RUN mamba install --channel conda-forge --yes 'jupyter-ai' 'google-generativeai' 'huggingface_hub' 'ipython' 'ipywidgets' \
'llama-index' 'llama-index-cli' 'llama-index-core' \
'langchain-anthropic' 'langchain-google-genai' 'cohere' \
'llama-index-embeddings-huggingface'\
'llama-index-indices-managed-llama-cloud' \
'llama-index-llms-anthropic' 'llama-index-llms-gemini' 'llama-index-llms-groq' 'llama-index-llms-langchain' \
'llama-index-llms-localai' 'llama-index-llms-ollama' 'llama-index-llms-openai' 'llama-index-multi-modal-llms-ollama' \
'llama-index-readers-file' 'llama-index-readers-llama-parse' \
'llama-index-vector-stores-chroma' \
'llama-parse' 'nbconvert' 'pillow' 'prompttools' \
'pydantic' 'pyvis' 'spacy' 'SQLAlchemy' 'torch' 'torchaudio' 'torchvision' 'txtai' && \
COPY llamaindex/requirements.txt .

RUN mamba install --yes 'jupyter-ai' 'huggingface_hub' 'ipython' 'ipywidgets' 'nbconvert' 'pillow' 'pydantic' 'pyvis' 'spacy' 'SQLAlchemy' 'txtai' && \
mamba clean --all -f -y && fix-permissions "${CONDA_DIR}" && fix-permissions "/home/${NB_USER}" && \
python3 -m spacy download en_core_web_trf && \
python3 -m spacy download en_core_web_lg && \
python -c "import sys, importlib.util as util; 1 if util.find_spec('nltk') else sys.exit(); import nltk; nltk.download('punkt')"

RUN pip install --no-cache-dir -U pip wheel setuptools && \
pip install -r requirements.txt













14 changes: 7 additions & 7 deletions llamaindex/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
google-generativeai<0.4.0,>=0.3.2
ipython==8.22.2
# ipython==8.22.2
llama-index-agent-openai>=0.1.4,<0.3.0
llama-index-cli==0.1.2
llama-index-core==0.10.25
Expand All @@ -24,17 +24,17 @@ llama-index-readers-obsidian==0.1.3
llama-index-vector-stores-chroma==0.1.6
llama-index==0.10.25
llama-parse<0.4.0,>=0.3.3
nbconvert==7.16.3
# nbconvert==7.16.3
openai==1.14.3
prompttools==0.0.46
pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0
pyvis==0.3.2
spacy==3.7.4
SQLAlchemy>=2.0.25
# pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0
# pyvis==0.3.2
# spacy==3.7.4
# SQLAlchemy>=2.0.25
torch>=2.1.2+cpu
torchaudio
torchvision>=0.16.2+cpu
txtai==7.0.0
# txtai==7.0.0
typing_extensions<5,>=4.7
unstructured==0.12.6
spacy-llm==0.7.1
Expand Down
12 changes: 1 addition & 11 deletions nlp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,7 @@ ENV LC_ALL=C.UTF-8
ENV PATH $HOME/.local/share/gem/ruby/3.1.0/bin:$HOME/.local/bin:$PATH
ENV BUNDLE_PATH $HOME/.local/share/gem

RUN mamba install --channel conda-forge --yes 'jupyter-ai' 'google-generativeai' 'huggingface_hub' 'ipython' 'ipywidgets' \
'llama-index' 'llama-index-cli' 'llama-index-core' \
'langchain-anthropic' 'langchain-google-genai' 'cohere' \
'llama-index-embeddings-huggingface'\
'llama-index-indices-managed-llama-cloud' \
'llama-index-llms-anthropic' 'llama-index-llms-gemini' 'llama-index-llms-groq' 'llama-index-llms-langchain' \
'llama-index-llms-localai' 'llama-index-llms-ollama' 'llama-index-llms-openai' 'llama-index-multi-modal-llms-ollama' \
'llama-index-readers-file' 'llama-index-readers-llama-parse' \
'llama-index-vector-stores-chroma' \
'llama-parse' 'nbconvert' 'pillow' 'prompttools' \
'pydantic' 'pyvis' 'spacy' 'SQLAlchemy' 'torch' 'torchaudio' 'torchvision' 'txtai' && \
RUN mamba install --yes 'jupyter-ai' 'huggingface_hub' 'ipython' 'ipywidgets' 'nbconvert' 'pillow' 'pydantic' 'pyvis' 'spacy' 'SQLAlchemy' 'txtai' && \
mamba clean --all -f -y && fix-permissions "${CONDA_DIR}" && fix-permissions "/home/${NB_USER}" && \
python3 -m spacy download en_core_web_trf && \
python3 -m spacy download en_core_web_lg && \
Expand Down
14 changes: 7 additions & 7 deletions nlp/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
google-generativeai<0.4.0,>=0.3.2
ipython==8.22.2
# ipython==8.22.2
llama-index-agent-openai>=0.1.4,<0.3.0
llama-index-cli==0.1.2
llama-index-core==0.10.25
Expand All @@ -24,17 +24,17 @@ llama-index-readers-obsidian==0.1.3
llama-index-vector-stores-chroma==0.1.6
llama-index==0.10.25
llama-parse<0.4.0,>=0.3.3
nbconvert==7.16.3
# nbconvert==7.16.3
openai==1.14.3
prompttools==0.0.46
pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0
pyvis==0.3.2
spacy==3.7.4
SQLAlchemy>=2.0.25
# pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0
# pyvis==0.3.2
# spacy==3.7.4
# SQLAlchemy>=2.0.25
torch>=2.1.2+cpu
torchaudio
torchvision>=0.16.2+cpu
txtai==7.0.0
# txtai==7.0.0
typing_extensions<5,>=4.7
unstructured==0.12.6
spacy-llm==0.7.1
Expand Down

0 comments on commit 3727972

Please sign in to comment.