Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions internal/namespaces/inference/v1beta1/custom_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ func endpointCreateBuilder(c *core.Command) *core.Command {
createEndpointCustomRequest := argsI.(*createEndpointRequestCustom)
createEndpointreq := createEndpointCustomRequest.CreateEndpointRequest
endpoint := createEndpointCustomRequest.Endpoint
endpointToCreate := inference.EndpointSpec{
Public: nil,
PrivateNetwork: nil,
DisableAuth: endpoint.DisableAuth,
}
if endpoint.IsPublic {
publicEndpoint := &inference.EndpointSpecPublic{}
endpointToCreate := inference.EndpointSpec{
Public: publicEndpoint,
PrivateNetwork: nil,
DisableAuth: endpoint.DisableAuth,
}
createEndpointreq.Endpoint = &endpointToCreate
endpointToCreate.Public = publicEndpoint
}
if endpoint.PrivateNetwork != nil && endpoint.PrivateNetwork.PrivateNetworkID != "" {
endpointToCreate.PrivateNetwork = &inference.EndpointSpecPrivateNetwork{PrivateNetworkID: endpoint.PrivateNetwork.PrivateNetworkID}
}
createEndpointreq.Endpoint = &endpointToCreate

return runner(ctx, createEndpointreq)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/namespaces/inference/v1beta1/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import "github.com/scaleway/scaleway-cli/v2/core"
func CreateDeploymentPublicEndpoint() core.BeforeFunc {
return core.ExecStoreBeforeCmd(
"DEPLOYMENT",
"scw inference deployment create node-type=H100 accept-eula=true model-name=meta/llama-2-70b-chat:fp8 -w",
"scw inference deployment create node-type=H100 accept-eula=true model-name=mistral/mistral-7b-instruct-v0.3:bf16 -w",
)
}

func CreateDeploymentPrivateEndpoint() core.BeforeFunc {
return core.ExecStoreBeforeCmd(
"DEPLOYMENT",
"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",
"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",
)
}

Expand Down
Loading