forked from mage-ai/mage-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 902 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
FROM python
LABEL description="Deploy Mage on ECS"
ARG PIP=pip3
USER root
# Install Mage
RUN ${PIP} install "mage-ai[all]"
# Install NFS dependencies
RUN apt -y update && apt -y install nfs-common
# Set up spark kernel
RUN ${PIP} install sparkmagic
RUN mkdir ~/.sparkmagic
RUN wget https://raw.githubusercontent.com/jupyter-incubator/sparkmagic/master/sparkmagic/example_config.json
RUN mv example_config.json ~/.sparkmagic/config.json
RUN sed -i 's/localhost:8998/host.docker.internal:9999/g' ~/.sparkmagic/config.json
RUN jupyter-kernelspec install --user $(pip show sparkmagic | grep Location | cut -d" " -f2)/sparkmagic/kernels/pysparkkernel
COPY integrations integrations
RUN ${PIP} install integrations/
EXPOSE 6789
ENV PYTHONPATH="${PYTHONPATH}:/home/src"
WORKDIR /home/src
COPY ./scripts/run_app.sh /app/run_app.sh
RUN chmod +x /app/run_app.sh
CMD ["/bin/sh", "-c", "/app/run_app.sh"]