-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/l3t3-format-benchmark
- Loading branch information
Showing
44 changed files
with
1,303 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/config.local | ||
/tmp | ||
/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[core] | ||
remote = minio | ||
['remote "minio"'] | ||
url = s3://ml-data | ||
endpointurl = http://10.0.0.6:9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Add patterns of files dvc should ignore, which could improve | ||
# the performance. Learn more at | ||
# https://dvc.org/doc/user-guide/dvcignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,38 @@ | ||
FROM python:3.12-slim as builder | ||
FROM python:3.11-slim as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY app/requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
FROM builder | ||
FROM builder AS app-flask | ||
|
||
COPY app . | ||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "app:app"] | ||
EXPOSE 8000 | ||
|
||
FROM builder AS app-streamlit | ||
CMD streamlit run --server.address 0.0.0.0 --server.port 8080 src/serving/streamlit.py | ||
|
||
|
||
FROM builder AS app-fastapi | ||
CMD uvicorn --host 0.0.0.0 --port 8090 --workers 4 src.serving.fastapi:app | ||
|
||
FROM builder AS app-seldon | ||
EXPOSE 5000 | ||
EXPOSE 9000 | ||
ENV MODEL_NAME SeldonAPI | ||
ENV SERVICE_TYPE MODEL | ||
COPY app/src/serving/seldon.py /app/SeldonAPI.py | ||
|
||
RUN chown -R 8888 /app | ||
RUN mkdir /.cache | ||
RUN chmod 777 /.cache | ||
RUN mkdir /.config | ||
RUN chmod 777 /.config | ||
|
||
CMD exec seldon-core-microservice $MODEL_NAME --service-type $SERVICE_TYPE | ||
|
||
|
||
FROM builder AS app-kserve | ||
ENTRYPOINT ["python", "app/src/serving/kserve.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from pathlib import Path | ||
import wandb | ||
|
||
def publish_model(model_path: str, project: str, name: str, model_type: str = "model"): | ||
with wandb.init(project=project, job_type="model-publishing") as run: | ||
artifact = wandb.Artifact(name, type=model_type) | ||
artifact.add_dir(model_path) | ||
run.log_artifact(artifact) | ||
print(f"Published {name} to W&B") | ||
|
||
def download_model(model_name: str, project: str, download_path: Path, model_type: str = "model"): | ||
with wandb.init(project=project) as run: | ||
artifact = run.use_artifact(model_name, type=model_type) | ||
artifact_dir = artifact.download(root=download_path) | ||
print(f"Downloaded {model_name} to {artifact_dir}") |
Oops, something went wrong.