Spaces:
Sleeping
Sleeping
docs: update readme with python installation directions
Browse files
README.md
CHANGED
|
@@ -43,7 +43,7 @@ Supported systems:
|
|
| 43 |
|
| 44 |
### Pre-requisites
|
| 45 |
|
| 46 |
-
- [python3.11
|
| 47 |
- [uv](https://docs.astral.sh/uv/)
|
| 48 |
|
| 49 |
```bash
|
|
@@ -52,16 +52,26 @@ Supported systems:
|
|
| 52 |
|
| 53 |
## Installation
|
| 54 |
|
|
|
|
|
|
|
| 55 |
```bash
|
| 56 |
git clone https://github.com/pathology-data-mining/mosaic.git
|
| 57 |
cd mosaic
|
| 58 |
uv sync
|
| 59 |
```
|
| 60 |
|
| 61 |
-
|
| 62 |
|
| 63 |
```bash
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
```
|
| 66 |
|
| 67 |
## Deploying to Hugging Face Spaces
|
|
@@ -85,6 +95,7 @@ This repository is configured for deployment on Hugging Face Spaces with Zero GP
|
|
| 85 |
### Zero GPU Configuration
|
| 86 |
|
| 87 |
The app uses the `@spaces.GPU` decorator to allocate GPU resources only when needed for inference. This allows efficient use of Zero GPU resources on Hugging Face Spaces. The GPU is automatically allocated when:
|
|
|
|
| 88 |
- Processing tissue segmentation
|
| 89 |
- Extracting features with CTransPath and Optimus models
|
| 90 |
- Running Aeon and Paladin model inference
|
|
@@ -230,6 +241,7 @@ mosaic --server-name 0.0.0.0 --server-port 7860
|
|
| 230 |
```
|
| 231 |
|
| 232 |
Check for available ports using:
|
|
|
|
| 233 |
```bash
|
| 234 |
ss -tuln | grep :7860
|
| 235 |
```
|
|
|
|
| 43 |
|
| 44 |
### Pre-requisites
|
| 45 |
|
| 46 |
+
- [python3.11](https://www.python.org/)
|
| 47 |
- [uv](https://docs.astral.sh/uv/)
|
| 48 |
|
| 49 |
```bash
|
|
|
|
| 52 |
|
| 53 |
## Installation
|
| 54 |
|
| 55 |
+
Ensure that you have ssh credentials setup to access the paladin private repository. (Create key with `ssh-keygen` and put in your github profile, Settings -> SSH and GPG keys.)
|
| 56 |
+
|
| 57 |
```bash
|
| 58 |
git clone https://github.com/pathology-data-mining/mosaic.git
|
| 59 |
cd mosaic
|
| 60 |
uv sync
|
| 61 |
```
|
| 62 |
|
| 63 |
+
Note that when installing via `uv sync`, the virtual environment will be created in the `./.venv` directory. To activate it, run:
|
| 64 |
|
| 65 |
```bash
|
| 66 |
+
source .venv/bin/activate
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
Alternatively, create a virtual environment mosaic-venv (in a subdirectory), activate it, and install the app directly from the repository:
|
| 70 |
+
|
| 71 |
+
```bash
|
| 72 |
+
uv venv mosaic-venv --python 3.11
|
| 73 |
+
source mosaic-venv/bin/activate
|
| 74 |
+
uv pip install git+ssh://git@github.com/pathology-data-mining/paladin_webapp.git@dev
|
| 75 |
```
|
| 76 |
|
| 77 |
## Deploying to Hugging Face Spaces
|
|
|
|
| 95 |
### Zero GPU Configuration
|
| 96 |
|
| 97 |
The app uses the `@spaces.GPU` decorator to allocate GPU resources only when needed for inference. This allows efficient use of Zero GPU resources on Hugging Face Spaces. The GPU is automatically allocated when:
|
| 98 |
+
|
| 99 |
- Processing tissue segmentation
|
| 100 |
- Extracting features with CTransPath and Optimus models
|
| 101 |
- Running Aeon and Paladin model inference
|
|
|
|
| 241 |
```
|
| 242 |
|
| 243 |
Check for available ports using:
|
| 244 |
+
|
| 245 |
```bash
|
| 246 |
ss -tuln | grep :7860
|
| 247 |
```
|