Entrypoint:
In gcloud.py
:
if __name__ == "__main__":
sys.argv.extend(["endpoints", "services", "deploy", "/Users/romain/dev/alpine/spec.json", "--project=sothebys-data"])
main()
# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
import logging | |
from io import BytesIO | |
from typing import Dict | |
import torch | |
from PIL import Image | |
from ray import serve | |
from starlette.requests import Request | |
from torchvision import transforms | |
from torchvision.models import resnet18 |
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2018-2020 Sotheby's | |
# | |
from click import Context | |
from invoke import run, task | |
from pathlib import Path | |
from tempfile import TemporaryDirectory | |
from typing import Iterable, Set |
#!/bin/sh | |
# check for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1` | |
wd=`pwd` | |
# were we given a directory? | |
if [ -d "$1" ]; then | |
# echo "checking for things in the working dir given" | |
wd=`ls -1d "$1" | head -n1` |