Closed gosber closed 1 year ago
hi,@gosber 这里有两个问题:
第一个问题,构建出错,看起来应该是 Docker 版本的问题,解析 https://github.com/soulteary/docker-prompt-generator/blob/main/docker/Dockerfile.base#L10 这里的执行代码出错。
解决方案是更新 docker 版本。
第二个问题,docker 里的 get-model.py 的内容:
在上面的链接中:
RUN cat > /get-models.py <<EOF
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
AutoModelForSeq2SeqLM.from_pretrained('Helsinki-NLP/opus-mt-zh-en')
AutoTokenizer.from_pretrained('Helsinki-NLP/opus-mt-zh-en')
pipeline('text-generation', model='succinctly/text2image-prompt-generator')
EOF
…/docker-prompt-generator main 3.9.12 (anaconda3) ╰ docker build -t soulteary/prompt-generator:gpu . -f docker/Dockerfile.gpu [+] Building 0.1s (2/2) FINISHED => [internal] load build definition from Dockerfile.gpu 0.0s => => transferring dockerfile: 41B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error line 8: FROM requires either one or three arguments