File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
internal/namespaces/inference/v1beta1 Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,19 @@ func endpointCreateBuilder(c *core.Command) *core.Command {
3232 createEndpointCustomRequest := argsI .(* createEndpointRequestCustom )
3333 createEndpointreq := createEndpointCustomRequest .CreateEndpointRequest
3434 endpoint := createEndpointCustomRequest .Endpoint
35+ endpointToCreate := inference.EndpointSpec {
36+ Public : nil ,
37+ PrivateNetwork : nil ,
38+ DisableAuth : endpoint .DisableAuth ,
39+ }
3540 if endpoint .IsPublic {
3641 publicEndpoint := & inference.EndpointSpecPublic {}
37- endpointToCreate := inference.EndpointSpec {
38- Public : publicEndpoint ,
39- PrivateNetwork : nil ,
40- DisableAuth : endpoint .DisableAuth ,
41- }
42- createEndpointreq .Endpoint = & endpointToCreate
42+ endpointToCreate .Public = publicEndpoint
43+ }
44+ if endpoint .PrivateNetwork != nil && endpoint .PrivateNetwork .PrivateNetworkID != "" {
45+ endpointToCreate .PrivateNetwork = & inference.EndpointSpecPrivateNetwork {PrivateNetworkID : endpoint .PrivateNetwork .PrivateNetworkID }
4346 }
47+ createEndpointreq .Endpoint = & endpointToCreate
4448
4549 return runner (ctx , createEndpointreq )
4650 }
Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ import "github.com/scaleway/scaleway-cli/v2/core"
55func CreateDeploymentPublicEndpoint () core.BeforeFunc {
66 return core .ExecStoreBeforeCmd (
77 "DEPLOYMENT" ,
8- "scw inference deployment create node-type=H100 accept-eula=true model-name=meta/llama-2-70b-chat:fp8 -w" ,
8+ "scw inference deployment create node-type=H100 accept-eula=true model-name=mistral/mistral-7b-instruct-v0.3:bf16 -w" ,
99 )
1010}
1111
1212func CreateDeploymentPrivateEndpoint () core.BeforeFunc {
1313 return core .ExecStoreBeforeCmd (
1414 "DEPLOYMENT" ,
15- "scw inference deployment create node-type=H100 accept-eula=true model-name=meta/llama-2-70b-chat:fp8 endpoints.0.private-network.private-network-id={{ .PN.ID }} -w" ,
15+ "scw inference deployment create node-type=H100 accept-eula=true model-name=mistral/mistral-7b-instruct-v0.3:bf16 endpoints.0.private-network.private-network-id={{ .PN.ID }} -w" ,
1616 )
1717}
1818
You can’t perform that action at this time.
0 commit comments