Commit c90df435 authored by chenpangpang's avatar chenpangpang
Browse files

feat: 新增run.sh、启动器.sh、.gitignore

parent c1be49cb
Pipeline #1385 failed with stages
in 0 seconds
FROM image.sourcefind.cn:5000/gpu/admin/base/jupyterlab-pytorch:2.2.0-python3.10-cuda12.1-ubuntu22.04 as base
RUN cd /root && git clone -b gpu http://developer.hpccube.com/codes/chenpangpang/instantid.git
WORKDIR /root/instantid/InstantID
COPY chenyh/InstantID/InstantID /root/instantid/InstantID/checkpoints
COPY chenyh/InstantID/antelopev2 /root/instantid/InstantID/models/antelopev2
COPY chenyh/InstantID/wangqixun /root/instantid/InstantID/wangqixun
RUN apt-get update && apt-get install -y gcc g++
RUN pip install -r gradio_demo/requirements.txt && \
pip install onnxruntime-gpu==1.18.0 --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
#########
# Prod #
#########
FROM image.sourcefind.cn:5000/gpu/admin/base/jupyterlab-pytorch:2.2.0-python3.10-cuda12.1-ubuntu22.04
COPY --from=base /opt/conda/lib/python3.10/site-packages /opt/conda/lib/python3.10/site-packages
COPY --from=base /root/instantid/InstantID /root/InstantID
COPY --from=base /root/instantid/启动器.ipynb /root/instantid/run.sh /root/
# RUN apt-get update && apt-get install -y libglib2.0-0 libgl1-mesa-glx
\ No newline at end of file
#!/bin/bash
cd /root/InstantID
python gradio_demo/app.py
{
"cells": [
{
"cell_type": "markdown",
"id": "e5c5a211-2ccd-4341-af10-ac546484b91f",
"metadata": {
"tags": []
},
"source": [
"## 说明\n",
"\n",
"- 启动和重启 Notebook 点上方工具栏中的「重启并运行所有单元格」。出现 `http://0.0.0.0:7860` 这个字样就算成功了。可以去控制台打开「自定义服务」了\n",
"- 访问自定义服务端口号设置为7860\n",
"\n",
"## 功能介绍\n",
"- 原项目地址:https://github.com/InstantID/InstantID\n",
"- InstantID:一张照片,无需训练,秒级个人写真生成\n",
"- 由InstantX项目组推出的一种SOTA的tuning-free方法,只需单个图像即可实现 ID 保留生成,并支持各种下游任务。 在InstantID这样的技术之前,结合 Textual Inversion、DreamBooth 和 LoRA 等方法,个性化图像合成取得了重大进展。过去的方案,通常需要结合微调,需要较多的样本图片,较高的显存要求,以及较长的训练"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "53a96614-e2d2-4710-a82b-0d5ca9cb9872",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/opt/conda/envs/kolors/lib/python3.8/site-packages/gradio_client/documentation.py:105: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix'\n",
" warnings.warn(f\"Could not get documentation group for {cls}: {exc}\")\n",
"/opt/conda/envs/kolors/lib/python3.8/site-packages/gradio_client/documentation.py:105: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix'\n",
" warnings.warn(f\"Could not get documentation group for {cls}: {exc}\")\n",
"/opt/conda/envs/kolors/lib/python3.8/site-packages/diffusers/models/transformers/transformer_2d.py:34: FutureWarning: `Transformer2DModelOutput` is deprecated and will be removed in version 1.0.0. Importing `Transformer2DModelOutput` from `diffusers.models.transformer_2d` is deprecated and this will be removed in a future version. Please use `from diffusers.models.modeling_outputs import Transformer2DModelOutput`, instead.\n",
" deprecate(\"Transformer2DModelOutput\", \"1.0.0\", deprecation_message)\n",
"Loading checkpoint shards: 100%|██████████████████| 7/7 [00:16<00:00, 2.35s/it]\n",
"Running on local URL: http://0.0.0.0:7860\n",
"\n",
"To create a public link, set `share=True` in `launch()`.\n",
"IMPORTANT: You are using gradio version 3.38.0, however version 4.29.0 is available, please upgrade.\n",
"--------\n",
"100%|███████████████████████████████████████████| 50/50 [00:26<00:00, 1.90it/s]\n"
]
}
],
"source": [
"# 启动\n",
"!bash run.sh"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9e81ae9d-3a34-43a0-943a-ff5e9d6ce961",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
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