File size: 865 Bytes
b4cb5b0
 
 
 
 
 
 
 
 
 
 
 
 
a89e85a
ab2abe8
b4cb5b0
 
 
 
ab2abe8
b4cb5b0
 
3e66927
 
ab2abe8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM ghcr.io/ggml-org/llama.cpp:full

# 作業ディレクトリを /app に固定(権限問題の回避)
WORKDIR /app

# 必要なパッケージをインストール
RUN apt update && apt install -y python3-pip

# huggingface_hub のインストール
RUN pip install -U huggingface_hub

# Pythonスクリプトで直接実行
RUN python3 -c 'from huggingface_hub import hf_hub_download; \
    hf_hub_download(repo_id="lxcorp/Link-270M-GGUF", \
    filename="link1-270m-q8_0.gguf", \
    local_dir=".", \
    local_dir_use_symlinks=False)'

# 念のためファイルが存在するか確認する
RUN ls -lh /app/link1-270m-q8_0.gguf

# CPUでサーバーを起動
COPY template /app/template
# CPUでサーバーを起動
CMD ["--server","-m","/app/link1-270m-q8_0.gguf","--chat-template-file","/app/template","--port","7860","--host","0.0.0.0","-n","4096"]