diff --git a/Dockerfile.docs b/Dockerfile.docs new file mode 100644 index 00000000000..e98ed631d1e --- /dev/null +++ b/Dockerfile.docs @@ -0,0 +1,13 @@ +FROM condaforge/mambaforge:latest + +RUN conda install -c conda-forge conda-lock +RUN --mount=type=bind,source=monodocs-environment.lock.yaml,target=monodocs-environment.lock.yaml \ + conda-lock install -n monodocs-env monodocs-environment.lock.yaml + +ENV SETUPTOOLS_SCM_PRETEND_VERSION 2.0.0 +COPY flyteidl flyteidl +SHELL ["conda", "run", "-n", "monodocs-env", "/bin/bash", "-c"] +RUN python -m pip install ./flyteidl + +WORKDIR /docs +ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "monodocs-env", "sphinx-build"] diff --git a/Makefile b/Makefile index 64af8207879..51bd025e03e 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,14 @@ helm_upgrade: ## Upgrade helm charts docs: make -C docs clean html SPHINXOPTS=-W +.PHONY: build-dev-docs-image +build-dev-docs-image: + docker buildx build -t flyte-dev-docs:latest -f Dockerfile.docs . + +.PHONY: dev-docs +dev-docs: + docker run --rm --pull never -v ./docs:/docs flyte-dev-docs:latest -M html . _build + .PHONY: help help: SHELL := /bin/sh help: ## List available commands and their usage