"examples/community/pipeline_stable_diffusion_boxdiff.py" did not exist on "06b01ea87e219c072e92db91dfda5f8f423b284a"
Commit 3c821ab7 authored by chenpangpang's avatar chenpangpang
Browse files

update jupyter plugin

parent 90f95878
...@@ -54,9 +54,6 @@ RUN pip3 install --upgrade pip ${SOURCES} || pip install --upgrade pip ${SOURCES ...@@ -54,9 +54,6 @@ RUN pip3 install --upgrade pip ${SOURCES} || pip install --upgrade pip ${SOURCES
&& mv /etc/apt/sources.list.bak /etc/apt/sources.list \ && mv /etc/apt/sources.list.bak /etc/apt/sources.list \
&& mv /etc/apt/sources.list.d.bak /etc/apt/sources.list.d && mv /etc/apt/sources.list.d.bak /etc/apt/sources.list.d
COPY ./python-requirements.txt /tmp/
RUN pip install --no-cache-dir -r /tmp/python-requirements.txt
# 安装pytorch 需要设置代理 # 安装pytorch 需要设置代理
#ENV http_proxy=http://ac19pn3az3:M36tPjtQ@10.21.131.1:3128/ #ENV http_proxy=http://ac19pn3az3:M36tPjtQ@10.21.131.1:3128/
#ENV https_proxy=http://ac19pn3az3:M36tPjtQ@10.21.131.1:3128/ #ENV https_proxy=http://ac19pn3az3:M36tPjtQ@10.21.131.1:3128/
...@@ -66,6 +63,9 @@ RUN if [ $BASE_IMAGE_IS_TORCH -eq 0 ];then \ ...@@ -66,6 +63,9 @@ RUN if [ $BASE_IMAGE_IS_TORCH -eq 0 ];then \
--index-url https://download.pytorch.org/whl/cu$(echo "$BASE_IMAGE" | awk -F'[:-]' '{n=split($2,a,"."); print a[1] a[2]}') \ --index-url https://download.pytorch.org/whl/cu$(echo "$BASE_IMAGE" | awk -F'[:-]' '{n=split($2,a,"."); print a[1] a[2]}') \
&& rm -r /root/.cache/pip; fi && rm -r /root/.cache/pip; fi
COPY ./python-requirements.txt /tmp/
RUN pip install --no-cache-dir -r /tmp/python-requirements.txt
### 添加HF的镜像变量 ### 添加HF的镜像变量
ENV HF_ENDPOINT=https://hf-mirror.com ENV HF_ENDPOINT=https://hf-mirror.com
RUN echo 'export HF_ENDPOINT=https://hf-mirror.com' >> /etc/bash.bashrc && \ RUN echo 'export HF_ENDPOINT=https://hf-mirror.com' >> /etc/bash.bashrc && \
...@@ -75,8 +75,8 @@ RUN echo 'export HF_ENDPOINT=https://hf-mirror.com' >> /etc/bash.bashrc && \ ...@@ -75,8 +75,8 @@ RUN echo 'export HF_ENDPOINT=https://hf-mirror.com' >> /etc/bash.bashrc && \
# 安装jupyterlab插件, 生成sshd配置 # 安装jupyterlab插件, 生成sshd配置
RUN pip3 install jupyterlab==4.0.0 RUN pip3 install jupyterlab==4.0.0
RUN mkdir -p /tmp/jupyter-extension RUN mkdir -p /tmp/jupyter-extension
COPY ./jupyter_ext_dataset-0.1.0-py3-none-any.whl /tmp/jupyter-extension/ COPY ./jupyter_ext_model-1.0.7-py3-none-any.whl /tmp/jupyter-extension/
COPY ./jupyter_ext_logo-0.1.0-py3-none-any.whl /tmp/jupyter-extension/ COPY ./jupyter_ext_platform-1.0.10-py3-none-any.whl /tmp/jupyter-extension/
COPY ./jupyterlab_language_pack_zh_cn-4.0.post6-py2.py3-none-any.whl /tmp/jupyter-extension/ COPY ./jupyterlab_language_pack_zh_cn-4.0.post6-py2.py3-none-any.whl /tmp/jupyter-extension/
COPY ./requirements.txt /tmp/jupyter-extension/ COPY ./requirements.txt /tmp/jupyter-extension/
COPY ./static /tmp/jupyter-extension/static COPY ./static /tmp/jupyter-extension/static
......
...@@ -60,6 +60,9 @@ pip3 uninstall -r $WORKSPACE/requirements.txt ...@@ -60,6 +60,9 @@ pip3 uninstall -r $WORKSPACE/requirements.txt
pip3 install --no-index --find-links=$WORKSPACE/ -r $WORKSPACE/requirements.txt pip3 install --no-index --find-links=$WORKSPACE/ -r $WORKSPACE/requirements.txt
if pip list | grep -E 'jupyter_ext_dataset' && pip list | grep -E 'jupyter_ext_logo' && pip list | grep -E 'jupyterlab-language-pack-zh-CN' && [ "$(jupyter lab --version | cut -d. -f1)" -gt 2 ];then echo "安装成功";else echo \"安装失败!! \" | tee /jupyter-ext/errorImages.txt; fi if pip list | grep -E 'jupyter_ext_platform' && pip list | grep -E 'jupyter_ext_model' && pip list | grep -E 'jupyterlab-language-pack-zh-CN' && [ "$(jupyter lab --version | cut -d. -f1)" -gt 2 ];then echo "安装成功";else echo \"安装失败!! \" | tee /jupyter-ext/errorImages.txt; fi
# 禁用splash插件
jupyter labextension disable @jupyterlab/apputils-extension:splash
rm -r $WORKSPACE rm -r $WORKSPACE
jupyterlab-language-pack-zh-CN jupyterlab-language-pack-zh-CN
jupyter_ext_logo jupyter_ext_platform==1.0.10
jupyter_ext_dataset jupyter_ext_model==1.0.7
\ No newline at end of file
...@@ -24,9 +24,15 @@ ...@@ -24,9 +24,15 @@
window.history.replaceState({ }, '', url); window.history.replaceState({ }, '', url);
})();</script> })();</script>
<body>
<div id="sugon-logo-wrap"> <div id="sugon-logo-wrap">
<img src="{{page_config.fullStaticUrl}}/scnet-loading.gif" /> <img src="{{page_config.fullStaticUrl}}/scnet-loading.gif" />
<div class="waiting-text">加载服务中,请稍候</div>
<span class="time-limit time-limited">
当前实例任务单次运行最大时长
<span class="time" id="sugon-time-limit"></span>
,请注意及时保存重要文件
</span>
<span class="time-limit time-unlimited">当前实例任务不会自动关停并将持续产生费用,请注意按需手动关停。</span>
</div> </div>
</body> </body>
<style> <style>
...@@ -35,14 +41,32 @@ ...@@ -35,14 +41,32 @@
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 300px;
height: 150px;
z-index: 100; z-index: 100;
text-align: center;
} }
#sugon-logo-wrap img { #sugon-logo-wrap img {
width: 100%; width: 50px;
}
#sugon-logo-wrap .waiting-text {
font-size: 20px;
font-weight: 500;
color: #3b4048;
line-height: 30px;
margin: 18px 0 26px;
text-align: center;
} }
#sugon-logo-wrap .time-limit {
font-size: 14px;
font-weight: 400;
color: #3B4048;
line-height: 14px;
display: none;
}
#sugon-logo-wrap .time-limit .time {
font-weight: 700;
font-size: 18px;
color: #FFB333;
}
</style> </style>
<script> <script>
var sugonLoadInterval = setInterval(() => { var sugonLoadInterval = setInterval(() => {
...@@ -52,5 +76,18 @@ ...@@ -52,5 +76,18 @@
document.body.removeChild(document.getElementById('sugon-logo-wrap')) document.body.removeChild(document.getElementById('sugon-logo-wrap'))
} }
}, 100) }, 100)
const query = new URLSearchParams(window.location.search);
if (query.get('limit')) {
const limit = query.get('limit')
if (limit === 'unlimited') {
document.querySelector('.time-limit.time-unlimited').style.display = 'block'
} else {
const timeText = Number(limit.split(':')[0]) + '小时'
document.querySelector('.time-limit.time-limited').style.display = 'block'
document.getElementById('sugon-time-limit').innerText = timeText
}
}
</script> </script>
</html> </html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>JupyterLab</title><meta name="viewport" content="width=device-width,initial-scale=1">{# Copy so we do not modify the page_config with updates. #} {% set page_config_full = page_config.copy() %} {# Set a dummy variable - we just want the side effect of the update. #} {% set _ = page_config_full.update(baseUrl=base_url, wsUrl=ws_url) %}<script id="jupyter-config-data" type="application/json">{{ page_config_full | tojson }}</script>{% block favicon %}<link rel="icon" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon.ico" class="idle favicon"><link rel="" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon-busy-1.ico" class="busy favicon">{% endblock %}<script defer="defer" src="{{page_config.fullStaticUrl}}/main.9907354c68bf45c5d68c.js?v=9907354c68bf45c5d68c"></script></head> <!doctype html><html lang="en"><head><meta charset="utf-8"><title>JupyterLab</title><meta name="viewport" content="width=device-width,initial-scale=1">{# Copy so we do not modify the page_config with updates. #} {% set page_config_full = page_config.copy() %} {# Set a dummy variable - we just want the side effect of the update. #} {% set _ = page_config_full.update(baseUrl=base_url, wsUrl=ws_url) %}<script id="jupyter-config-data" type="application/json">{{ page_config_full | tojson }}</script>{% block favicon %}<link rel="icon" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon.ico" class="idle favicon"><link rel="" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon-busy-1.ico" class="busy favicon">{% endblock %}<script defer="defer" src="{{page_config.fullStaticUrl}}/main.cad2364f9e7610a9f01d.js?v=cad2364f9e7610a9f01d"></script></head>
<script>/* Remove token from URL. */ <script>/* Remove token from URL. */
(function () { (function () {
var location = window.location; var location = window.location;
...@@ -24,9 +24,15 @@ ...@@ -24,9 +24,15 @@
window.history.replaceState({ }, '', url); window.history.replaceState({ }, '', url);
})();</script> })();</script>
<body>
<div id="sugon-logo-wrap"> <div id="sugon-logo-wrap">
<img src="{{page_config.fullStaticUrl}}/scnet-loading.gif" /> <img src="{{page_config.fullStaticUrl}}/scnet-loading.gif" />
<div class="waiting-text">加载服务中,请稍候</div>
<span class="time-limit time-limited">
当前实例任务单次运行最大时长
<span class="time" id="sugon-time-limit"></span>
,请注意及时保存重要文件
</span>
<span class="time-limit time-unlimited">当前实例任务不会自动关停并将持续产生费用,请注意按需手动关停。</span>
</div> </div>
</body> </body>
<style> <style>
...@@ -35,14 +41,32 @@ ...@@ -35,14 +41,32 @@
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 300px;
height: 150px;
z-index: 100; z-index: 100;
text-align: center;
} }
#sugon-logo-wrap img { #sugon-logo-wrap img {
width: 100%; width: 50px;
}
#sugon-logo-wrap .waiting-text {
font-size: 20px;
font-weight: 500;
color: #3b4048;
line-height: 30px;
margin: 18px 0 26px;
text-align: center;
} }
#sugon-logo-wrap .time-limit {
font-size: 14px;
font-weight: 400;
color: #3B4048;
line-height: 14px;
display: none;
}
#sugon-logo-wrap .time-limit .time {
font-weight: 700;
font-size: 18px;
color: #FFB333;
}
</style> </style>
<script> <script>
var sugonLoadInterval = setInterval(() => { var sugonLoadInterval = setInterval(() => {
...@@ -52,5 +76,18 @@ ...@@ -52,5 +76,18 @@
document.body.removeChild(document.getElementById('sugon-logo-wrap')) document.body.removeChild(document.getElementById('sugon-logo-wrap'))
} }
}, 100) }, 100)
const query = new URLSearchParams(window.location.search);
if (query.get('limit')) {
const limit = query.get('limit')
if (limit === 'unlimited') {
document.querySelector('.time-limit.time-unlimited').style.display = 'block'
} else {
const timeText = Number(limit.split(':')[0]) + '小时'
document.querySelector('.time-limit.time-limited').style.display = 'block'
document.getElementById('sugon-time-limit').innerText = timeText
}
}
</script> </script>
</html> </html>
...@@ -6,3 +6,5 @@ transformers ...@@ -6,3 +6,5 @@ transformers
git-lfs git-lfs
accelerate accelerate
diffusers diffusers
datasets
hf_transfer
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment