Skip to content

Commit

Permalink
make pipelines-dir and additional-python-path pluggable
Browse files Browse the repository at this point in the history
  • Loading branch information
masci committed Mar 6, 2024
1 parent 3dd005a commit 7866cd5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
10 changes: 9 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,16 @@ FROM $base_image AS final

COPY --from=build-image /opt/venv /opt/venv

ARG pipelines_dir
RUN mkdir -p $pipelines_dir
ENV HAYHOOKS_PIPELINES_DIR=$pipelines_dir

ARG additional_python_path
RUN mkdir -p $additional_python_path
ENV HAYHOOKS_ADDITIONAL_PYTHONPATH=$additional_python_path

EXPOSE 1416

ENV PATH="/opt/venv/bin:$PATH"

CMD ["hayhooks", "run", "--host", "0.0.0.0", "--port", "1416"]
CMD ["hayhooks", "run", "--host", "0.0.0.0"]
14 changes: 8 additions & 6 deletions docker/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ variable "HAYHOOKS_VERSION" {
default = "main"
}

variable "GITHUB_REF" {
default = ""
}

variable "IMAGE_NAME" {
default = "deepset/hayhooks"
}
Expand All @@ -14,8 +10,12 @@ variable "IMAGE_TAG_SUFFIX" {
default = "local"
}

variable "BASE_IMAGE_TAG_SUFFIX" {
default = "local"
variable "PIPELINES_DIR" {
default = "/opt/pipelines"
}

variable "ADDITIONAL_PYTHON_PATH" {
default = "/opt/custom-components"
}

target "default" {
Expand All @@ -25,6 +25,8 @@ target "default" {
build_image = "deepset/haystack:base-main"
base_image = "deepset/haystack:base-main"
hayhooks_version = "${HAYHOOKS_VERSION}"
pipelines_dir = "${PIPELINES_DIR}"
additional_python_path = "${ADDITIONAL_PYTHON_PATH}"
}
platforms = ["linux/amd64", "linux/arm64"]
}

0 comments on commit 7866cd5

Please sign in to comment.