|
@@ -53,6 +53,7 @@ RUN conda install mamba -n base -c conda-forge
|
|
|
RUN ln /opt/conda/bin/mamba /usr/local/bin/mamba && mamba init zsh
|
|
|
|
|
|
|
|
|
+
|
|
|
FROM builder1 as builder2
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends openssh-server && rm -rf /var/lib/apt/lists/*
|
|
@@ -72,7 +73,6 @@ redirect_stderr = true\n\
|
|
|
|
|
|
EXPOSE 22
|
|
|
|
|
|
-
|
|
|
FROM builder2 as builder3
|
|
|
|
|
|
WORKDIR /workspace
|
|
@@ -80,13 +80,12 @@ ADD environment.yml /environment.yml
|
|
|
RUN sed -i 's#- paddlepaddle#- paddlepaddle-gpu==2.3.0.post110#g' /environment.yml && cat /environment.yml
|
|
|
RUN mamba update -n base -c defaults conda -y && mamba env create -f /environment.yml && rm -rf /root/.cache
|
|
|
|
|
|
-
|
|
|
# RUN /opt/conda/envs/py38/bin/python -m ipykernel install --name py38 --display-name "py38"
|
|
|
# RUN echo "c.MultiKernelManager.default_kernel_name = 'py38'">>/root/.jupyter/jupyter_notebook_config.py
|
|
|
RUN echo "\
|
|
|
[program:be]\n\
|
|
|
directory=/workspace\n\
|
|
|
-command=/opt/conda/envs/py38/bin/python server.py --host 0.0.0.0 --port 8080 \n\
|
|
|
+command=/opt/conda/envs/py38/bin/gunicorn server:app --workers 1 --worker-class=uvicorn.workers.UvicornWorker --bind 0.0.0.0:8080 --reload \n\
|
|
|
autorestart=true\n\
|
|
|
startretries=0\n\
|
|
|
redirect_stderr=true\n\
|
|
@@ -96,11 +95,11 @@ stdout_logfile_maxbytes=0\n\
|
|
|
|
|
|
ARG VERSION
|
|
|
ENV USE_CUDA $VERSION
|
|
|
-
|
|
|
Add . /workspace
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
|
+
|
|
|
# RUN mamba install -y jupyterlab -n base && mamba init zsh
|
|
|
# RUN /opt/conda/bin/jupyter notebook --generate-config && \
|
|
|
# echo "c.NotebookApp.password='argon2:\$argon2id\$v=19\$m=10240,t=10,p=8\$+zIUCF9Uk2FiCHlV8njX5A\$I5Mm/64DORArcXYTXWRVng'">>/root/.jupyter/jupyter_notebook_config.py
|