1
0
mirror of https://github.com/containers/ramalama.git synced 2026-02-05 06:46:39 +01:00

Rename ramalama to ramalama.py

Move ci.sh into test subdir.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2024-08-21 09:12:20 -04:00
parent 852f388d8b
commit aabb35fc94
6 changed files with 20 additions and 18 deletions

View File

@@ -6,7 +6,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Run a one-line script
run: ./ci.sh
run: make test
macos:
runs-on: macos-12
@@ -14,5 +14,5 @@ jobs:
- uses: actions/checkout@v3
- name: Run a one-line script
shell: bash
run: ./ci.sh
run: make test

View File

@@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Run a one-line script
run: ./ci.sh
run: make test
macos:
runs-on: macos-12
@@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- name: Run a one-line script
shell: bash
run: ./ci.sh
run: make test
build:
runs-on: ubuntu-22.04

View File

@@ -37,7 +37,7 @@ docs:
.PHONY:
test:
./ci.sh
test/ci.sh
.PHONY: clean
clean:

View File

@@ -60,7 +60,8 @@ def main():
tmp_dir = tempfile.mkdtemp()
try:
from_file = "ramalama"
binfile=ramalama
from_file = binfile + ".py"
host = "https://raw.githubusercontent.com"
url = f"{host}/containers/ramalama/s/{from_file}"
to_file = os.path.join(tmp_dir, from_file)
@@ -71,7 +72,7 @@ def main():
subprocess.run([sys.executable, "-m", "pip",
"install", "omlmd==0.1.2"], check=True)
ramalama_bin = os.path.join(bindir, from_file)
ramalama_bin = os.path.join(bindir, binfile)
subprocess.run(["install", "-m755", to_file, ramalama_bin], check=True)
finally:
cleanup(tmp_dir)

View File

@@ -33,7 +33,8 @@ main() {
omlmd --help
fi
chmod +x ramalama install.py
binfile=ramalama.py
chmod +x ${binfile} install.py
if [ "$os" = "Linux" ]; then
./container_build.sh
autopep8 --exit-code ramalama # Check style is correct
@@ -43,18 +44,18 @@ main() {
$maybe_sudo ./install.py # todo macos support
set +o pipefail
./ramalama -h | grep Usage:
./${binfile} -h | grep Usage:
set -o pipefail
./ramalama pull tinyllama
./ramalama pull ben1t0/tiny-llm
./ramalama pull ollama://tinyllama:1.1b
./ramalama pull huggingface://afrideva/Tiny-Vicuna-1B-GGUF/tiny-vicuna-1b.q2_k.gguf
./ramalama pull oci://quay.io/mmortari/gguf-py-example:v1
./ramalama list | grep tinyllama
./ramalama list | grep tiny-vicuna-1b
./ramalama list | grep NAME
./ramalama list | grep oci://quay.io/mmortari/gguf-py-example/v1/example.gguf
./${binfile} pull tinyllama
./${binfile} pull ben1t0/tiny-llm
./${binfile} pull ollama://tinyllama:1.1b
./${binfile} pull huggingface://afrideva/Tiny-Vicuna-1B-GGUF/tiny-vicuna-1b.q2_k.gguf
./${binfile} pull oci://quay.io/mmortari/gguf-py-example:v1
./${binfile} list | grep tinyllama
./${binfile} list | grep tiny-vicuna-1b
./${binfile} list | grep NAME
./${binfile} list | grep oci://quay.io/mmortari/gguf-py-example/v1/example.gguf
# ramalama list | grep granite-code
# ramalama rm granite-code
}