Skip to content

Commit

Permalink
ci(playground): fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tc-imba committed Aug 19, 2024
1 parent 1a2121e commit bb84194
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)!
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions projects/sbos-playground/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit bb84194

Please sign in to comment.