diff --git a/docs/deployment.md b/docs/deployment.md index 6d08514..a897d06 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -6,7 +6,7 @@ SBOS is managed as a mono-repo. Clone the repository and work in the project dir ```bash git clone https://github.com/BrickSchema/playground -cd playground +cd projects/sbos-playground ``` ## Configuration @@ -19,7 +19,7 @@ Please follow this [guide](config/index.md) to configure it. === "Docker Compose (recommended)" - In the playground directory, run + In the playground directory (`projects/sbos-playground`), run ```bash docker-compose up --build -d # (1)! @@ -28,6 +28,12 @@ Please follow this [guide](config/index.md) to configure it. 1. make sure the context is correct if not using `docker-compose` but `docker build` and make sure the `docker-compose` version is at least `v2` + In development mode, run + + ```bash + docker compose -f docker-compose.yml -f docker-compose-dev.yml up -d --build + ``` + === "Direct" (Not yet completed) diff --git a/projects/sbos-playground/Dockerfile b/projects/sbos-playground/Dockerfile index 667a1f3..c95221e 100644 --- a/projects/sbos-playground/Dockerfile +++ b/projects/sbos-playground/Dockerfile @@ -38,12 +38,12 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH" # install dependencies COPY pyproject.toml poetry.lock README.md /root/sbos-playground/ COPY sbos/playground/__init__.py /root/sbos-playground/sbos/playground/ -COPY --from=sbos:minimal /root/sbos-minimal/pyproject.toml /root/sbos-minimal/poetry.lock /root/sbos-minimal/README.md /root/sbos-minimal/ -COPY --from=sbos:minimal /root/sbos-minimal/sbos/minimal/__init__.py /root/sbos-minimal/sbos/minimal/ +COPY --from=tcimba/sbos:minimal /root/sbos-minimal/pyproject.toml /root/sbos-minimal/poetry.lock /root/sbos-minimal/README.md /root/sbos-minimal/ +COPY --from=tcimba/sbos:minimal /root/sbos-minimal/sbos/minimal/__init__.py /root/sbos-minimal/sbos/minimal/ RUN --mount=type=cache,target=/root/.cache poetry install --without dev RUN --mount=type=cache,target=/root/.cache pip3 install torch --index-url https://download.pytorch.org/whl/cpu COPY . /root/sbos-playground -COPY --from=sbos:minimal /root/sbos-minimal /root/sbos-minimal +COPY --from=tcimba/sbos:minimal /root/sbos-minimal /root/sbos-minimal RUN --mount=type=cache,target=/root/.cache poetry install --without dev # RUN rm /root/sbos-playground/.env/