By default, Ollama is only accessible from localhost. CORS error and HTTP 403 returned if try to invoke from other hosts.
To enable Ollama can be visited from hosts on intranet, run:
1
$ launchctl setenv OLLAMA_HOST "0.0.0.0"
in MacOS. Then restart Ollama. Then invoke it from hosts on intranet.
To enable Ollama can be visited from internet, with the help from ngrok, run:
1 2 3 4 5 6 7 8 9 10 11 12 13
$ ngrok http 11434
ngrok (Ctrl+C to quit)
Session Status online Account Terrence Miao (Plan: Free) Version 3.17.0 Region Australia (au) Web Interface http://127.0.0.1:4040 Forwarding https://294b-2403-5802-1c44-0-341c-aae8-a501-8b73.ngrok-free.app -> http://localhost:11434
$ curl --location 'https://294b-2403-5802-1c44-0-341c-aae8-a501-8b73.ngrok-free.app/v1/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ "model": "deepseek-coder-v2", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Write a function that outputs the fibonacci sequence in TypeScript." } ] }'
{ "id": "chatcmpl-174", "object": "chat.completion", "created": 1728738926, "model": "deepseek-coder-v2", "system_fingerprint": "fp_ollama", "choices": [ { "index": 0, "message": { "role": "assistant", "content": " Certainly! Below is a TypeScript function that outputs the Fibonacci sequence up to a specified number of terms:
This function starts with the initial terms of the Fibonacci sequence `[0, 1]` and then iteratively calculates each subsequent term by summing the two preceding terms. The function returns an array containing the first `n` terms of the Fibonacci sequence. " }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 29, "completion_tokens": 243, "total_tokens": 272 } }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
function fibonacciSequence(n: number): number[] { if (n <= 0) return []; if (n === 1) return [0];
const result: number[] = [0, 1];
for (let i = 2; i < n; i++) { result.push(result[i - 1] + result[i - 2]); }
Latest MacOS Sequoia has made another security enforcement. To open and run a Mac application, e.g. VLC nightly build at https://nightlies.videolan.org/, Unidentified Developer , the following steps can take.
Enable “Allow Applications from Anywhere”
1 2 3 4
base ~ sudo spctl --master-disable Password: Globally disabling the assessment system needs to be confirmed in System Settings.
Go to System Settings -> Privacy & Security, select “Allow Applications from Anywhere”:
1 2 3 4
base ~ sudo spctl --master-enable Password: This operation is no longer supported. Please see the man page for more information.
Disable MacOS Quarantine on the application
In this case application VLC:
1 2
base ~ xattr -dr com.apple.quarantine /Applications/VLC.app
A Mellanox ConnectX-4 MCX455A-ECAT PCIe x16 3.0 100GBe VPI EDR IB network adapter. Enable VT-d(Intel Virtualization Technology for Directed I/O), SR-IOV (Single Root IO Virtualization), and the number of Virtual Functions in Chipset and Network in BIOS.
The following steps are made in a Proxmox Virtual Environment (PVE).
root@pve:~# ip link show ... 4: enp1s0np0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr2 state UP mode DEFAULT group default qlen 1000 link/ether ec:0d:9a:76:eb:2a brd ff:ff:ff:ff:ff:ff ...
Write to the sysfs file the number of Virtual Functions:
In Windows 11 Pro Station, a Mellanox ConnectX-4 MCX455A-ECAT PCIe x16 3.0 100GBe VPI EDR IB network adatper, goes to support SMB Direct, client and server side SMB Multichannel and RDMA (Remote Direct Memory Access):
PS C:\> Set-SmbClientConfiguration -EnableMultiChannel $true Confirm Are you sure you want to perform this action? Performing operation 'Modify' on Target 'SMB Client Configuration'. [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
PS C:\> Set-SmbServerConfiguration -EnableMultiChannel $true Confirm Are you sure you want to perform this action? Performing operation 'Modify' on Target 'SMB Server Configuration'. [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
Have a look TrueNAS disk speed benchmark, over a 100Gbps ethernet network, from Windows 11 Pro for Workstations with SMB Direct, client/server SMB Multichannel and RDMA enabled:
In Windows Server 2022, with SMB shared folder in Storage Spaces:
Run Windows Powershell as Administrator user , which RDMA Capable are all True for both SMB client/server:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
Have a look Windows Server 2022 disk speed benchmark, over a 100Gbps ethernet network, from Windows 11 Pro for Workstations with SMB Direct, client/server SMB Multichannel and RDMA enabled:
Modify config.plist file under EFI folder -> OC folder, change the default Screen Resolution from 1080P1920x1080@32 to 2K2560x1440@32. Look more information in Configuration.pdf file in KVM-Opencore release
Connect with Apple Remote Desktop, so can use exact same Apple Keyboard mapping:
Current KVM-Opencore hasn’t setup support for Audio device and GPU accelerator.
Also try to setup Parsec in MacOS on Proxmox, without success.
MikroTik CRS504-4XQ-IN, the Cloud Switch can handle FOUR QSFP28 100Gbps ports, equal to 16 x 25Gbps bandwidth.
Setup single link mode, only the first QSFP28 sub-interface needs to be configured, while the remaining three sub-interfaces should remain enabled. For example, connect Mellanox MCX455A-ECAT ConnectX-4 InfiniBand/Ethernet adapter card (EDR IB 100Gbps and 100GbE, single-port QSFP28, PCIe 3.0x16) using ONTi DAC QSFP28 100Gbps cable to the switch.
Change FEC Mode to fec91.
Ethernet Forward Error Correction (FEC) is a technique used to improve the reliability of data transmission over Ethernet networks by detecting and correcting errors in data packets. The two most common types of FEC used in Ethernet networks are CL74 and CL91.
CL74 and CL91 refer to two different types of FEC codes, each with its own characteristics and performance. Here’s a brief comparison between the two:
Code Rate:
CL91 has a higher code rate of 91.6%, which means that only 8.4% of the data transmitted is used for error correction.
In addition, setup the swith port connected to ONTi QSFP28 40Gbps TO 4SFP+ breakout cable:
1 2 3 4 5 6
$ ssh -l admin MikroTik.local
[admin@MikroTik] > /interface ethernet set qsfp28-1-1 auto-negotiation=no speed=10G-baseCR [admin@MikroTik] > /interface ethernet set qsfp28-1-2 auto-negotiation=no speed=10G-baseCR [admin@MikroTik] > /interface ethernet set qsfp28-1-3 auto-negotiation=no speed=10G-baseCR [admin@MikroTik] > /interface ethernet set qsfp28-1-4 auto-negotiation=no speed=10G-baseCR
Speed test
In iperf3 server, run listens to 4 ports to manage connections in parallel: