update
This commit is contained in:
parent
c8d3be69a4
commit
9ae57d4a24
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
FROM public.ecr.aws/iflytek-open/cuda-go-python-base:11.6-1.17-3.9.13-ubuntu1804
|
FROM public.ecr.aws/iflytek-open/cuda-go-python-base:11.6-1.17-3.9.13-ubuntu1804
|
||||||
|
|
||||||
|
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list
|
||||||
|
RUN sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
|
||||||
|
|
||||||
|
RUN --mount=target=/root/packages.txt,source=packages.txt apt-get update && xargs -r -a /root/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /home/user/app
|
WORKDIR /home/user/app
|
||||||
RUN useradd -m -u 1000 user
|
RUN useradd -m -u 1000 user
|
||||||
|
@ -14,8 +18,11 @@ RUN pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/
|
||||||
RUN pip install --no-cache-dir pip==22.3.1
|
RUN pip install --no-cache-dir pip==22.3.1
|
||||||
RUN --mount=target=requirements.txt,source=requirements.txt pip install --no-cache-dir -r requirements.txt
|
RUN --mount=target=requirements.txt,source=requirements.txt pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
COPY --chown=1000 ./ /home/user/app
|
COPY --chown=1000 ./ /home/user/app
|
||||||
|
|
||||||
|
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
|
||||||
|
RUN apt-get install git-lfs
|
||||||
|
RUN git lfs install
|
||||||
|
RUN git clone http://172.16.59.16:3000/huggingface/distilgpt2.git
|
||||||
|
|
||||||
CMD ["python3", "app.py"]
|
CMD ["python3", "app.py"]
|
|
@ -22,7 +22,7 @@ with gr.Blocks() as demo:
|
||||||
"""
|
"""
|
||||||
# Text generation:distilgpt2
|
# Text generation:distilgpt2
|
||||||
DistilGPT2(Distilled-GPT2)是一种英语模型,在GPT-2的监督下进行预训练。与 GPT-2 一样,DistilGPT2 可用于生成文本。
|
DistilGPT2(Distilled-GPT2)是一种英语模型,在GPT-2的监督下进行预训练。与 GPT-2 一样,DistilGPT2 可用于生成文本。
|
||||||
这是一个distilgpt2的Gradio Demo. 输入你想要的英文文本或者点击下面的示例文本来加载它.
|
这是一个distilgpt2的Gradio Demo。 输入你想要的英文文本或者点击下面的示例文本来加载它。
|
||||||
""")
|
""")
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
text_input = gr.Textbox()
|
text_input = gr.Textbox()
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
git
|
||||||
|
curl
|
Loading…
Reference in New Issue