Skip to content

Commit

Permalink
feat: parllama service
Browse files Browse the repository at this point in the history
  • Loading branch information
av committed Aug 3, 2024
1 parent f353d35 commit 3b2fd60
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ HARBOR_TABBYAPI_MODEL="Annuvin/gemma-2-2b-it-abliterated-4.0bpw-exl2"
HARBOR_TABBYAPI_MODEL_SPECIFIER="Annuvin_gemma-2-2b-it-abliterated-4.0bpw-exl2"
HARBOR_TABBYAPI_EXTRA_ARGS=""

# Parllama
HARBOR_PARLLAMA_CACHE="~/.parllama"

# ============================================
# Service Configuration.
# You can specify any of the service's own environment variables here.
Expand Down
12 changes: 12 additions & 0 deletions compose.parllama.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
parllama:
container_name: ${HARBOR_CONTAINER_PREFIX}.parllama
env_file: ./.env
build:
context: ./parllama
dockerfile: Dockerfile
volumes:
- ${HARBOR_PARLLAMA_CACHE}:/root/.parllama
tty: true
networks:
- harbor-network
4 changes: 4 additions & 0 deletions compose.x.ollama.webui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
webui:
environment:
- OLLAMA_BASE_URL=http://ollama:11434
4 changes: 4 additions & 0 deletions compose.x.parllama.ollama.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
parllama:
environment:
- OLLAMA_URL=http://ollama:11434
9 changes: 9 additions & 0 deletions harbor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ show_help() {
echo " openai - Configure OpenAI API keys and URLs"
echo " vllm - Configure VLLM service"
echo " aphrodite - Configure Aphrodite service"
echo " parllama - Launch Parllama - TUI for chatting with Ollama models"
echo
echo "Huggingface CLI:"
echo " hf - Run the Harbor's Huggingface CLI. Expanded with a few additional commands."
Expand Down Expand Up @@ -906,6 +907,10 @@ run_tabbyapi_command() {
esac
}

run_parllama_command() {
$(compose_with_options "parllama") run -it --entrypoint bash parllama -c parllama
}


# ========================================================================
# == Main script
Expand Down Expand Up @@ -1061,6 +1066,10 @@ case "$1" in
shift
run_tabbyapi_command $@
;;
parllama)
shift
run_parllama_command $@
;;
config)
shift
env_manager $@
Expand Down
9 changes: 9 additions & 0 deletions parllama/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM pkgxdev/pkgx

# Install required packages
RUN pkgx install [email protected] pipx openssl && \
pipx install parllama

RUN echo 'export LD_LIBRARY_PATH=$(find / -name "*.so" -exec dirname {} \; | sort -u | tr "\n" ":" | sed '\''s/:$//'\'')"${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"' >> ~/.bashrc

CMD parllama

0 comments on commit 3b2fd60

Please sign in to comment.