servicing
Advanced tools
+19
-19
@@ -417,5 +417,5 @@ # This file is automatically @generated by Cargo. | ||
| name = "hyper" | ||
| version = "1.3.0" | ||
| version = "1.3.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9f24ce812868d86d19daa79bf3bf9175bc44ea323391147a5e3abde2a283871b" | ||
| checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" | ||
| dependencies = [ | ||
@@ -781,5 +781,5 @@ "bytes", | ||
| name = "pyo3" | ||
| version = "0.21.1" | ||
| version = "0.21.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "a7a8b1990bd018761768d5e608a13df8bd1ac5f678456e0f301bb93e5f3ea16b" | ||
| checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" | ||
| dependencies = [ | ||
@@ -800,5 +800,5 @@ "cfg-if", | ||
| name = "pyo3-build-config" | ||
| version = "0.21.1" | ||
| version = "0.21.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "650dca34d463b6cdbdb02b1d71bfd6eb6b6816afc708faebb3bac1380ff4aef7" | ||
| checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" | ||
| dependencies = [ | ||
@@ -811,5 +811,5 @@ "once_cell", | ||
| name = "pyo3-ffi" | ||
| version = "0.21.1" | ||
| version = "0.21.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "09a7da8fc04a8a2084909b59f29e1b8474decac98b951d77b80b26dc45f046ad" | ||
| checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" | ||
| dependencies = [ | ||
@@ -822,5 +822,5 @@ "libc", | ||
| name = "pyo3-macros" | ||
| version = "0.21.1" | ||
| version = "0.21.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "4b8a199fce11ebb28e3569387228836ea98110e43a804a530a9fd83ade36d513" | ||
| checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" | ||
| dependencies = [ | ||
@@ -835,5 +835,5 @@ "proc-macro2", | ||
| name = "pyo3-macros-backend" | ||
| version = "0.21.1" | ||
| version = "0.21.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "93fbbfd7eb553d10036513cb122b888dcd362a945a00b06c165f2ab480d4cc3b" | ||
| checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" | ||
| dependencies = [ | ||
@@ -1028,5 +1028,5 @@ "heck", | ||
| name = "serde" | ||
| version = "1.0.197" | ||
| version = "1.0.198" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" | ||
| checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" | ||
| dependencies = [ | ||
@@ -1038,5 +1038,5 @@ "serde_derive", | ||
| name = "serde_derive" | ||
| version = "1.0.197" | ||
| version = "1.0.198" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" | ||
| checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" | ||
| dependencies = [ | ||
@@ -1050,5 +1050,5 @@ "proc-macro2", | ||
| name = "serde_json" | ||
| version = "1.0.115" | ||
| version = "1.0.116" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" | ||
| checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" | ||
| dependencies = [ | ||
@@ -1087,3 +1087,3 @@ "itoa", | ||
| name = "servicing" | ||
| version = "0.0.5" | ||
| version = "0.0.6" | ||
| dependencies = [ | ||
@@ -1090,0 +1090,0 @@ "base64", |
+1
-1
| [package] | ||
| name = "servicing" | ||
| version = "0.0.5" | ||
| version = "0.0.6" | ||
| edition = "2021" | ||
@@ -5,0 +5,0 @@ |
+1
-1
| Metadata-Version: 2.3 | ||
| Name: servicing | ||
| Version: 0.0.5 | ||
| Version: 0.0.6 | ||
| Classifier: Programming Language :: Rust | ||
@@ -5,0 +5,0 @@ Classifier: Programming Language :: Python :: Implementation :: CPython |
+9
-0
@@ -11,2 +11,8 @@ from typing import List, Optional | ||
| :param cloud: the cloud on which the service should running | ||
| :param workdir: the working directory of the service | ||
| :param disk_size: the disk size of the service | ||
| :param cpu: the CPU upper bound of the service | ||
| :param memory: the memory upper bound of the service | ||
| :param setup: the setup command of the service | ||
| :param run: the run command of the service | ||
| """ | ||
@@ -18,2 +24,5 @@ | ||
| workdir: Optional[str] = None, | ||
| disk_size: Optional[int] = None, | ||
| cpu: Optional[str] = None, | ||
| memory: Optional[str] = None, | ||
| setup: Optional[str] = None, | ||
@@ -20,0 +29,0 @@ run: Optional[str] = None) -> None: ... |
+22
-6
@@ -11,2 +11,5 @@ use pyo3::{pyclass, pymethods}; | ||
| pub workdir: Option<String>, | ||
| pub disk_size: Option<u16>, | ||
| pub cpu: Option<String>, | ||
| pub memory: Option<String>, | ||
| pub setup: Option<String>, | ||
@@ -24,2 +27,5 @@ pub run: Option<String>, | ||
| workdir: Option<String>, | ||
| disk_size: Option<u16>, | ||
| cpu: Option<String>, | ||
| memory: Option<String>, | ||
| setup: Option<String>, | ||
@@ -33,2 +39,5 @@ run: Option<String>, | ||
| workdir, | ||
| disk_size, | ||
| cpu, | ||
| memory, | ||
| setup, | ||
@@ -63,2 +72,11 @@ run, | ||
| } | ||
| if let Some(disk_size) = config.disk_size { | ||
| self.resources.disk_size = disk_size; | ||
| } | ||
| if let Some(cpu) = &config.cpu { | ||
| self.resources.cpus = cpu.clone(); | ||
| } | ||
| if let Some(memory) = &config.memory { | ||
| self.resources.memory = memory.clone(); | ||
| } | ||
| if let Some(setup) = &config.setup { | ||
@@ -105,11 +123,9 @@ self.setup = setup.clone(); | ||
| cloud: "aws".to_string(), | ||
| disk_size: 50, | ||
| disk_size: 100, | ||
| }, | ||
| workdir: ".".to_string(), | ||
| setup: "conda install cudatoolkit -y\n".to_string() | ||
| + "pip install gt4sd-trainer-hf-pl\n" | ||
| + "pip install .\n" | ||
| + "pip install fastapi\n" | ||
| + "pip install uvicorn\n", | ||
| run: "python service.py\n".to_string(), | ||
| + "pip install poetry\n" | ||
| + "poetry install\n", | ||
| run: "poetry run python service.py\n".to_string(), | ||
| } | ||
@@ -116,0 +132,0 @@ } |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
77949
1.22%94
10.59%