|
@@ -1,19 +1,20 @@
|
|
|
FROM node:16.15.1-bullseye-slim AS builder
|
|
|
-WORKDIR /src
|
|
|
-COPY . /src/
|
|
|
-ENV PYTHONPATH=/src
|
|
|
+COPY docker_build/requirements.txt .
|
|
|
RUN echo "deb http://mirror.nju.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list && \
|
|
|
echo "deb http://mirror.nju.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
echo "deb http://mirror.nju.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
echo "deb http://mirror.nju.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
- apt update && apt install -y python3 python3-pip python-is-python3 make git \
|
|
|
+ apt update && apt install -y python3 python3-pip python-is-python3 make \
|
|
|
&& pip config set global.index-url https://mirror.nju.edu.cn/pypi/web/simple \
|
|
|
- && pip install -U pip setuptools && pip install -r /src/docker_build/requirements.txt \
|
|
|
- && yarn config set registry https://registry.npmmirror.com \
|
|
|
- && ./bdist_wheel.sh && cd sparkmagic && ./bdist_wheel.sh
|
|
|
+ && pip install -U pip setuptools && pip install -r requirements.txt \
|
|
|
+ && yarn config set registry https://registry.npmmirror.com
|
|
|
+COPY . /src/
|
|
|
+ENV PYTHONPATH=/src
|
|
|
+RUN cd /src && ./bdist_wheel.sh && \
|
|
|
+ cd ./sparkmagic && ./bdist_wheel.sh && \
|
|
|
+ cd ../dag && make yarn-install build-ui build-server
|
|
|
|
|
|
FROM jupyterhub/jupyterhub:2.3
|
|
|
-COPY --from=builder /src/dist/*.whl /src/sparkmagic/dist/*.whl /dist/
|
|
|
COPY docker_jupyterhub/requirements.txt .
|
|
|
RUN echo "deb http://mirror.nju.edu.cn/ubuntu/ focal main restricted universe multiverse" > /etc/apt/sources.list && \
|
|
|
echo "deb http://mirror.nju.edu.cn/ubuntu/ focal-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
|
|
@@ -21,10 +22,12 @@ RUN echo "deb http://mirror.nju.edu.cn/ubuntu/ focal main restricted universe mu
|
|
|
echo "deb http://mirror.nju.edu.cn/ubuntu/ focal-security main restricted universe multiverse" >> /etc/apt/sources.list && \
|
|
|
apt update && apt install -y libkrb5-dev krb5-user gcc python3-dev git openjdk-8-jre && \
|
|
|
pip config set global.index-url https://mirror.nju.edu.cn/pypi/web/simple && \
|
|
|
- pip install -r requirements.txt && rm requirements.txt && pip install /dist/*.whl && rm -rf /dist && \
|
|
|
- jupyter kernelspec install /usr/local/lib/python3.8/dist-packages/sparkmagic/kernels/pysparkkernel && \
|
|
|
+ pip install -r requirements.txt && rm requirements.txt && \
|
|
|
curl -fL http://mirror.nju.edu.cn/apache/hadoop/common/hadoop-3.2.3/hadoop-3.2.3.tar.gz -o hadoop-3.2.3.tar.gz && \
|
|
|
- mkdir -p /opt/cluster/conf && tar -xf hadoop-3.2.3.tar.gz -C /opt/cluster/ && rm hadoop-3.2.3.tar.gz && \
|
|
|
+ mkdir -p /opt/cluster/conf && tar -xf hadoop-3.2.3.tar.gz -C /opt/cluster/ && rm hadoop-3.2.3.tar.gz
|
|
|
+COPY --from=builder /src/dist/*.whl /src/sparkmagic/dist/*.whl /src/dag/dist/*.whl /dist/
|
|
|
+RUN pip install /dist/*.whl && rm -rf /dist && \
|
|
|
+ jupyter kernelspec install /usr/local/lib/python3.8/dist-packages/sparkmagic/kernels/pysparkkernel && \
|
|
|
useradd -m -p "VawT4F4qizTuw" test1 && \
|
|
|
useradd -m -p "vt8SVDBWk0fHI" test2 && \
|
|
|
useradd -m -p "c8dthZ3HAoxYY" test3
|