Skip to content

Commit

Permalink
chore: upgrading fabric to go version
Browse files Browse the repository at this point in the history
  • Loading branch information
av committed Sep 23, 2024
1 parent 3ef806d commit 606456b
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 979 deletions.
5 changes: 3 additions & 2 deletions compose.fabric.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
services:
fabric:
container_name: ${HARBOR_CONTAINER_PREFIX}.fabric
env_file: ./.env
env_file:
- ./.env
- ./fabric/override.env
build:
context: ./fabric
dockerfile: Dockerfile
volumes:
- ${HARBOR_FABRIC_CONFIG_PATH}:/root/.config/fabric
- ./fabric/utils.py:/root/.local/share/pipx/venvs/fabric/lib/python3.11/site-packages/installer/client/cli/utils.py
networks:
- harbor-network
12 changes: 5 additions & 7 deletions compose.x.fabric.ollama.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
services:
fabric:
entrypoint:
- "bash"
- "/app/fabric/start_fabric.sh"
- "-m"
- "${HARBOR_FABRIC_MODEL}"
- "--remoteOllamaServer"
- "${HARBOR_OLLAMA_INTERNAL_URL}"
environment:
- DEFAULT_VENDOR=Ollama
- DEFAULT_MODEL=${HARBOR_FABRIC_MODEL}
- OLLAMA_API_URL=${HARBOR_OLLAMA_INTERNAL_URL}

19 changes: 3 additions & 16 deletions fabric/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
FROM pkgxdev/pkgx
FROM golang:1.23.1

WORKDIR /app
RUN go install github.com/danielmiessler/fabric@latest

# pkgx install && warm up
RUN pkgx install git pipx python ffmpeg
RUN python --version && pipx --version && ffmpeg -version

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

WORKDIR /app/fabric

RUN pipx install .
RUN fabric --help

COPY start_fabric.sh /app/fabric/start_fabric.sh

ENTRYPOINT ["bash", "/app/fabric/start_fabric.sh"]
ENTRYPOINT [ "fabric" ]

2 changes: 2 additions & 0 deletions fabric/override.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file can be used for additional environment variables
# specifically for the fabric service.
5 changes: 0 additions & 5 deletions fabric/start_fabric.sh

This file was deleted.

Loading

0 comments on commit 606456b

Please sign in to comment.