Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove reference to non-existent docs in CONTRIBUTING.md #751

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ This section describes how to make a contribution to RamaLama.

### Prepare your environment

Read the [install documentation to see how to install dependencies](https://ramalama.io/getting-started/installation#build-and-run-dependencies).

The install documentation will illustrate the following steps:
- Installation of required tools
- Installing RamaLama from source

The minimum version of Python required to use RamaLama is PYTHON 3.12
The minimum version of Python required to use RamaLama is Python 3.12

### Fork and clone RamaLama

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Supported transports:
| HuggingFace | [`huggingface.co`](https://www.huggingface.co) |
| Ollama | [`ollama.com`](https://www.ollama.com) |
| OCI Container Registries | [`opencontainers.org`](https://opencontainers.org)|
||Examples: [`quay.io`](https://quay.io), [`Docker Hub`](https://docker.io), and [`Artifactory`](https://artifactory.com)|
||Examples: [`quay.io`](https://quay.io), [`Docker Hub`](https://docker.io), [`Pulp`](https://pulpproject.org), and [`Artifactory`](https://artifactory.com)|

RamaLama uses the Ollama registry transport by default. Use the RAMALAMA_TRANSPORTS environment variable to modify the default. `export RAMALAMA_TRANSPORT=huggingface` Changes RamaLama to use huggingface transport.

Expand Down
2 changes: 1 addition & 1 deletion ramalama/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def configure_arguments(parser):
dest="ngl",
type=int,
default=config.get("ngl", -1),
help="Number of layers to offload to the gpu, if available"
help="Number of layers to offload to the gpu, if available",
)
parser.add_argument(
"--keep-groups",
Expand Down
3 changes: 2 additions & 1 deletion ramalama/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
MNT_FILE = f"{MNT_DIR}/model.file"
HTTP_RANGE_NOT_SATISFIABLE = 416

DEFAULT_IMAGE="quay.io/ramalama/ramalama"
DEFAULT_IMAGE = "quay.io/ramalama/ramalama"


def container_manager():
engine = os.getenv("RAMALAMA_CONTAINER_ENGINE")
Expand Down
9 changes: 8 additions & 1 deletion ramalama/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,21 @@ def perform_download(self, file, progress):
self.total_to_download += self.file_size
self.now_downloaded = 0
self.start_time = time.time()
accumulated_size = 0
last_update_time = time.time()
while True:
data = self.response.read(1024)
if not data:
break

size = file.write(data)
if progress:
self.update_progress(size)
accumulated_size += size
if time.time() - last_update_time >= 0.1:
self.now_downloaded += accumulated_size
self.update_progress(self.now_downloaded, self.total_to_download)
accumulated_size = 0
last_update_time = time.time()

def human_readable_time(self, seconds):
hrs = int(seconds) // 3600
Expand Down
Loading