forked from ToucanToco/weaverbird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (25 loc) · 821 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# This container can build and run weaverbird's front-end and the pandas back-end.
#
# Usage:
# $ docker build -t weaverbird-playground .
# $ docker run -p 5000:5000 --rm -d weaverbird-playground
# and then access http://localhost:5000/?backend=pandas
FROM node:14 AS ui-builder
WORKDIR /weaverbird
# Install npm dependencies
COPY package.json yarn.lock ./
RUN yarn
# Build UI
COPY . ./
RUN yarn build
FROM python:3.8 as server
WORKDIR /weaverbird/server
COPY server /weaverbird/server
# Install pypi dependencies for the playground
RUN pip install -e ".[playground]"
# Copy UI files
COPY --from=ui-builder /weaverbird/playground/dist/* /weaverbird/server/static/
# Copy sample datasets
COPY ./playground/datastore /weaverbird/playground/datastore
CMD hypercorn --bind 0.0.0.0:5000 playground:app
EXPOSE 5000