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:
commit
5c80146d93
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
bridges/python/.venv/*
|
27
Dockerfile
Normal file
27
Dockerfile
Normal 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"]
|
13
README.md
13
README.md
@ -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).
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user