Spaces:
Paused
Paused
Create Dockerfil
Browse files
Dockerfil
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM debian:bookworm-slim
|
| 2 |
+
RUN apt update -y -qq; apt install -y curl wget python3-venv
|
| 3 |
+
RUN python3 -m venv v1
|
| 4 |
+
ENV PATH="/v1/bin:$PATH"
|
| 5 |
+
RUN pip install jupyterlab
|
| 6 |
+
|
| 7 |
+
#custom building begin------>
|
| 8 |
+
COPY rc.local /etc/
|
| 9 |
+
RUN chmod 777 /etc/rc.local
|
| 10 |
+
RUN --mount=type=secret,id=minio_pass,mode=0444,required=true minio_pass=$(cat /run/secrets/minio_pass);sed -i "s/{{minio_pass}}/${minio_pass}/g" /etc/rc.local
|
| 11 |
+
|
| 12 |
+
RUN wget https://dl.min.io/server/minio/release/linux-amd64/minio -O minio
|
| 13 |
+
RUN install minio /usr/bin/
|
| 14 |
+
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc -O mc
|
| 15 |
+
RUN install mc /usr/bin/
|
| 16 |
+
#<-----custom building end
|
| 17 |
+
|
| 18 |
+
RUN useradd -m -u 1000 user_cmd
|
| 19 |
+
USER user_cmd
|
| 20 |
+
RUN jupyter lab --generate-config
|
| 21 |
+
RUN echo "c.PasswordIdentityProvider.password_required=True">>/home/user_cmd/.jupyter/jupyter_lab_config.py
|
| 22 |
+
RUN echo "c.PasswordIdentityProvider.hashed_password='argon2:\$argon2id\$v=19\$m=10240,t=10,p=8\$ADVOtoQgkVyBkD2MAacNdg\$RwMBZJA+LsqnMQXxNElfTuUzHUOu1MvaRZ1kypvec9g'">>/home/user_cmd/.jupyter/jupyter_lab_config.py
|
| 23 |
+
ENV SHELL=/bin/bash
|
| 24 |
+
WORKDIR /home/user_cmd/
|
| 25 |
+
RUN echo 'export PATH="/usr/sbin:$PATH"' >> /home/user_cmd/.profile
|
| 26 |
+
CMD /etc/rc.local; jupyter lab --ip=0.0.0.0 --port=7860 --no-browser --allow-root
|