Skip to content

Commit

Permalink
feat(monodocs): Containerize documentation build environment
Browse files Browse the repository at this point in the history
Signed-off-by: Chi-Sheng Liu <[email protected]>
  • Loading branch information
MortalHappiness committed Feb 29, 2024
1 parent a2a63eb commit 13c43c5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile.docs
Original file line number Diff line number Diff line change
@@ -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"]
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 13c43c5

Please sign in to comment.