forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (23 loc) · 968 Bytes
/
Dockerfile
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
26
27
28
29
30
#---
# name: llama-factory
# group: llm
# requires: '>=35'
# depends: [bitsandbytes, flash-attention, auto_gptq, vllm]
# test: test.py
# notes: LLaMA-Factory for Jetson - https://github.com/hiyouga/LLaMA-Factory
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
WORKDIR /opt
ADD https://api.github.com/repos/hiyouga/LLaMA-Factory/git/refs/heads/main /tmp/llama_factory_version.json
RUN git clone --depth=1 https://github.com/hiyouga/LLaMA-Factory.git LLaMA-Factory && \
cd LLaMA-Factory && \
sed 's|DEFAULT_DATA_DIR = "data"|DEFAULT_DATA_DIR = "/opt/LLaMA-Factory/data"|' -i ./src/llamafactory/webui/common.py && \
sed 's|DEFAULT_SAVE_DIR = "saves"|DEFAULT_SAVE_DIR = "/data/models/llama-factory"|' -i ./src/llamafactory/webui/common.py && \
sed -i 's|"vllm>=0.4.3,<=0.6.0"|"vllm>=0.4.3,<=0.6.4"|' setup.py && \
pip3 install -e ".[metrics]"
ENV GRADIO_SERVER_PORT 7860
EXPOSE 7860
ENV API_PORT 8000
EXPOSE 8000
CMD ["llamafactory-cli", "webui"]