1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-09-20 06:17:20 +03:00

Merge pull request #9 from Antoinebr/develop

This commit is contained in:
Louis Grenard 2019-02-23 21:35:52 +08:00 committed by GitHub
commit 5c80146d93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 1 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
node_modules/
bridges/python/.venv/*

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
FROM node:10-alpine
WORKDIR /app
COPY . .
# Install system packages
RUN apk update --no-cache \
&& apk add --no-cache \
ca-certificates \
build-base \
python3 \
git \
tzdata
# Upgrade pip and install Pipenv
RUN pip3 install --upgrade pip \
&& pip install pipenv
# Install Leon
# Need to explicitly run the npm preinstall and npm posinstall scripts
# because npm tries to downgrade its privileges, and these scripts are not executed
RUN npm run preinstall
RUN npm install
RUN npm run postinstall
RUN npm run build
# Let's run it
CMD ["npm", "start"]

View File

@ -94,6 +94,19 @@ npm start
# Hooray! Leon is running
```
### Docker Installation
```sh
# Build
npm run docker:build
# Run
npm run docker:run
# Go to http://localhost:1337
# Hooray! Leon is running
```
## Documentation
For full documentation, visit [docs.getleon.ai](https://docs.getleon.ai).

View File

@ -42,7 +42,9 @@
"train": "babel-node scripts/run-train.js",
"prepare-release": "babel-node scripts/release/prepare-release.js",
"commitmsg": "babel-node scripts/commit-message.js && npm run lint",
"check": "babel-node scripts/run-check.js"
"check": "babel-node scripts/run-check.js",
"docker:build": "docker build -t leonai/leon . --force-rm",
"docker:run": "docker run -e TZ=`cat /etc/timezone` -d -p 1337:1337 -it leonai/leon"
},
"dependencies": {
"@ffmpeg-installer/ffmpeg": "^1.0.17",