Skip to content

Commit

Permalink
Add Docker related files, update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dmandrioli committed May 6, 2020
1 parent 70e2e71 commit 9cd1ec3
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules
**/.meteor/local
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# The tag here should match the Meteor version of your app, per .meteor/release
FROM geoffreybooth/meteor-base:1.10.2

# Copy app package.json and package-lock.json into container
COPY ./package*.json $APP_SOURCE_FOLDER/

RUN bash $SCRIPTS_FOLDER/build-app-npm-dependencies.sh

# Copy app source into container
COPY ./ $APP_SOURCE_FOLDER/

RUN bash $SCRIPTS_FOLDER/build-meteor-bundle.sh


# Use the specific version of Node expected by your Meteor release, per https://docs.meteor.com/changelog.html; this is expected for Meteor 1.10.2
FROM node:12.16.1-alpine

ENV APP_BUNDLE_FOLDER /opt/bundle
ENV SCRIPTS_FOLDER /docker

# Runtime dependencies; if your dependencies need compilation (native modules such as bcrypt) or you are using Meteor <1.8.1, use app-with-native-dependencies.dockerfile instead
RUN apk --no-cache add \
bash \
ca-certificates

# Copy in entrypoint
COPY --from=0 $SCRIPTS_FOLDER $SCRIPTS_FOLDER/

# Copy in app bundle
COPY --from=0 $APP_BUNDLE_FOLDER/bundle $APP_BUNDLE_FOLDER/bundle/

RUN bash $SCRIPTS_FOLDER/build-meteor-npm-dependencies.sh

# Start app
ENTRYPOINT ["/docker/entrypoint.sh"]

CMD ["node", "main.js"]
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ It is a [Meteor](http://www.meteor.com) app developed with [React](http://reactj
[Paper.js](http://paperjs.org/) and [three.js](https://threejs.org/).

**Latest changes**
- **Version 1.5:** Provide a Docker image and update to Meteor 1.10
- **Version 1.4:** Support for RGB pointclouds (thanks @Gekk0r)
- **Version 1.3:** Improve pointcloud labeling: bug fixes and performance improvement (labeling a 1M pointcloud is now possible)
- **Version 1.2.2:** Breaking change: exported point cloud coordinates are no longer translated (thanks @hetzge)
Expand All @@ -33,6 +34,24 @@ It is a [Meteor](http://www.meteor.com) app developed with [React](http://reactj

## How to run

### Using Docker Compose

1. Download the docker compose stack file (`sse-docker-stack.yml`)
2. Set the folder that contains bitmap and point cloud files (`YOUR_IMAGES_PATH`) and run the tool using docker-compose
3. The tool runs by default on port 80, you can change the mapping in `sse-docker-stack.yml`
```
wget https://raw.githubusercontent.com/Hitachi-Automotive-And-Industry-Lab/semantic-segmentation-editor/master/sse-docker-stack.yml
SSE_IMAGES=YOUR_IMAGES_PATH docker-compose -f sse-docker-stack.yml up
```

(Optional) You can use your own configuration file based on `settings.json` to customize classes data
```
wget https://raw.githubusercontent.com/Hitachi-Automotive-And-Industry-Lab/semantic-segmentation-editor/master/settings.json
METEOR_SETTINGS=$(cat ./settings.json) SSE_IMAGES=YOUR_IMAGES_PATH docker-compose -f stack.yml up
```

### Running from source

#### Install Meteor (OSX or Linux)

```shell
Expand Down
26 changes: 26 additions & 0 deletions sse-docker-stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3'

services:
app:
image: dmandrioli/semantic-segmentation-editor
volumes:
- "${SSE_IMAGES}:/root/sse-images:rw"
ports:
- '80:3000'
depends_on:
- mongo
environment:
ROOT_URL: ${APP_ROOT_URL:-http://localhost}
MONGO_URL: mongodb://mongo:27017/meteor
PORT: 3000
METEOR_SETTINGS: ${METEOR_SETTINGS}

mongo:
image: mongo:latest
command:
- --storageEngine=wiredTiger
volumes:
- data:/data/db

volumes:
data:

0 comments on commit 9cd1ec3

Please sign in to comment.