Alpaca icon indicating copy to clipboard operation
Alpaca copied to clipboard

Add Mac-OS Support with brew packaged cask version of Alpaca

Open CodingKoalaGeneral opened this issue 1 year ago • 8 comments

Is your feature request related to a problem? Please describe. Increase popularity by going cross platform

Describe the solution you'd like Add Mac-OS Support with brew packaged cask version of Alpaca and or manually installable / standalone file

Describe alternatives you've considered Add Windows Support with choco packaged version of Alpaca and or manually installable / standalone file

CodingKoalaGeneral avatar Sep 19 '24 18:09 CodingKoalaGeneral

I have considered Mac OS before tho, I don't see anything wrong with doing it if it's easy to do, I tried for a couple of hours last week but I couldn't figure it out.

I don't have access to an actual Mac system, I have a Hackintosh but that introduces more problems

Jeffser avatar Sep 20 '24 06:09 Jeffser

Use this app : https://github.com/AugustDev/enchanted

While it has a nice UI, this seems to require that you pipe out a local ollama server via ngrok just to access it locally....

I have considered Mac OS before tho, I don't see anything wrong with doing it if it's easy to do, I tried for a couple of hours last week but I couldn't figure it out.

I do have access to one, what were the tricky bits you ran into?

frenata avatar Dec 21 '24 16:12 frenata

Hi, I just released an experimental version of Alpaca for MacOS, please read this wiki page.

Happy holidays btw

Jeffser avatar Dec 25 '24 03:12 Jeffser

Using a .dmg file instead of Brew Cask involves additional steps.

step 4: go to settings -> security / privacy -> allow execution of alpaca -> confirm using auth

Library not loaded: @executable_path/../Python3

$ brew install python3
==> Downloading https://formulae.brew.sh/api/formula.jws.json
################################################################################################# 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
################################################################################################# 100.0%
Warning: [email protected] 3.13.1 is already installed and up-to-date.

crash report below

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               python3 [88953]
Path:                  /Applications/Alpaca.app/Contents/MacOS/Alpaca
Identifier:            python3
Version:               ???
Code Type:             X86-64 (Translated)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-12-29 18:52:32.0093 +0100
OS Version:            macOS 15.2 (24C101)
Report Version:        12
Anonymous UUID:        F5F821BC-B5B5-84A7-5588-B6BF51802510

Sleep/Wake UUID:       76EBF301-9807-41EF-911D-0BEADA8A9D6F

Time Awake Since Boot: 86000 seconds
Time Since Wake:       963 seconds

System Integrity Protection: enabled

Notes:
PC register does not match crashing frame (0x0 vs 0x202C37A84)

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace DYLD, Code 1 Library missing
Library not loaded: @executable_path/../Python3
Referenced from: <0B92D5CF-68D1-3BE2-A9C2-B4EEC7073798> /Applications/Alpaca.app/Contents/Resources/venv/bin/python3
Reason: tried: '/Applications/Alpaca.app/Contents/Resources/venv/Python3' (no such file)
(terminated at launch; ignore backtrace)

Error Formulating Crash Report:
PC register does not match crashing frame (0x0 vs 0x202C37A84)

Thread 0 Crashed:
0   Rosetta Runtime Routines	       0x202c37a84 ???
1   dyld                          	       0x202aaf47a __abort_with_payload + 10
2   dyld                          	       0x202ac7217 abort_with_payload_wrapper_internal + 82
3   dyld                          	       0x202ac7249 abort_with_payload + 9
4   dyld                          	       0x202a59701 dyld4::halt(char const*, dyld4::StructuredError const*) + 335
5   dyld                          	       0x202a56822 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 4189
6   dyld                          	       0x202a55792 dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const + 572
7   dyld                          	       0x202a5527f start + 1727

Thread 1:: com.apple.rosetta.exceptionserver
0   runtime                       	    0x7ff7ffdbfea0 0x7ff7ffdbc000 + 16032


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000006  rbx: 0x000000000000006d  rcx: 0x0000000000000001  rdx: 0x000000030921a490
  rdi: 0x0000002000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x000000030921a090
   r8: 0x000000030921a090   r9: 0x0000000000000000  r10: 0x000000000000006d  r11: 0x000000030921a090
  r12: 0x0000000000000000  r13: 0x000000030921a490  r14: 0x0000000000000006  r15: 0x000000000000006d
  rip: <unavailable>       rfl: 0x0000000000000283
 tmp0: 0xffffffffffffffff tmp1: 0x0000000202c37a58 tmp2: 0x0000000202ac7217


Binary Images:
       0x202a4f000 -        0x202adafff dyld (*) <7e2d5f84-7d4f-3322-83cb-dd7bd247f06a> /usr/lib/dyld
    0x7ff7ffdbc000 -     0x7ff7ffdebfff runtime (*) <6a360c41-1729-30a8-b7d2-055dddac0786> /usr/libexec/rosetta/runtime
       0x10a6d3000 -        0x10a73afff libRosettaRuntime (*) <4cb71c5f-4e41-3ce6-a65a-b283bc4bfab5> /Library/Apple/*/libRosettaRuntime
       0x1026b5000 -        0x1026b6fff python3 (*) <0b92d5cf-68d1-3be2-a9c2-b4eec7073798> /Applications/Alpaca.app/Contents/Resources/venv/bin/python3
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1532K resident=0K(0%) swapped_out_or_unallocated=1532K(100%)
Writable regions: Total=166.0M written=177K(0%) resident=177K(0%) swapped_out=0K(0%) unallocated=165.9M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Rosetta Arena                     4096K        2 
Rosetta Generic                    928K      229 
Rosetta IndirectBranch              32K        1 
Rosetta JIT                      128.0M        1 
Rosetta Return Stack                20K        2 
Rosetta Thread Context              20K        2 
Stack                             8176K        1 
Stack Guard                       56.0M        1 
VM_ALLOCATE                          4K        1 
VM_ALLOCATE (reserved)               8K        2         reserved VM address space (unallocated)
__DATA                              96K        6 
__DATA_CONST                        28K        2 
__DATA_DIRTY                         8K        2 
__LINKEDIT                         400K        8 
__TEXT                            1176K        4 
__TPRO_CONST                       276K        1 
mapped file                       1160K        7 
page table in kernel               177K        1 
===========                     =======  ======= 
TOTAL                            200.2M      273 
TOTAL, minus reserved VM space   200.2M      273 



-----------
Full Report
-----------

{"app_name":"python3","timestamp":"2024-12-29 18:52:32.00 +0100","app_version":"","slice_uuid":"0b92d5cf-68d1-3be2-a9c2-b4eec7073798","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 15.2 (24C101)","roots_installed":0,"incident_id":"677789CD-0AEE-4EF5-B52B-1EBE6F2080FC","name":"python3"}
{
  "uptime" : 86000,
  "procRole" : "Background",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "Mac15,3",
  "coalitionID" : 3744,
  "osVersion" : {
    "train" : "macOS 15.2",
    "build" : "24C101",
    "releaseType" : "User"
  },
  "captureTime" : "2024-12-29 18:52:32.0093 +0100",
  "codeSigningMonitor" : 1,
  "incident" : "677789CD-0AEE-4EF5-B52B-1EBE6F2080FC",
  "pid" : 88953,
  "translated" : true,
  "cpuType" : "X86-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2024-12-29 18:52:25.6675 +0100",
  "procStartAbsTime" : 2087539350152,
  "procExitAbsTime" : 2087691468047,
  "procName" : "python3",
  "procPath" : "\/Applications\/Alpaca.app\/Contents\/MacOS\/Alpaca",
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.jeffser.Alpaca",
  "crashReporterKey" : "F5F821BC-B5B5-84A7-5588-B6BF51802510",
  "lowPowerMode" : 1,
  "codeSigningID" : "com.apple.python3",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 570442241,
  "codeSigningValidationCategory" : 1,
  "codeSigningTrustLevel" : 4294967295,
  "bootSessionUUID" : "C7F2252F-9427-4E99-83C4-22DEF0BA8AE7",
  "wakeTime" : 963,
  "sleepWakeUUID" : "76EBF301-9807-41EF-911D-0BEADA8A9D6F",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
  "termination" : {"code":1,"flags":518,"namespace":"DYLD","indicator":"Library missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["Library not loaded: @executable_path\/..\/Python3","Referenced from: <0B92D5CF-68D1-3BE2-A9C2-B4EEC7073798> \/Applications\/Alpaca.app\/Contents\/Resources\/venv\/bin\/python3","Reason: tried: '\/Applications\/Alpaca.app\/Contents\/Resources\/venv\/Python3' (no such file)"]},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":1287986,"threadState":{"flavor":"x86_THREAD_STATE","rbp":{"value":0},"r12":{"value":0},"rosetta":{"tmp2":{"value":8634790423},"tmp1":{"value":8636299864},"tmp0":{"value":18446744073709551615}},"rbx":{"value":109},"r8":{"value":13038100624},"r15":{"value":109},"r10":{"value":109},"rdx":{"value":13038101648},"rdi":{"value":137438953472},"r9":{"value":0},"r13":{"value":13038101648},"rflags":{"value":643},"rax":{"value":6},"rsp":{"value":13038100624},"r11":{"value":13038100624},"rcx":{"value":1},"r14":{"value":6},"rsi":{"value":0}},"frames":[{"imageOffset":8636299908,"region":"Rosetta Runtime Routines","symbolLocation":10884,"imageIndex":4},{"imageOffset":394362,"symbol":"__abort_with_payload","symbolLocation":10,"imageIndex":0},{"imageOffset":492055,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":82,"imageIndex":0},{"imageOffset":492105,"symbol":"abort_with_payload","symbolLocation":9,"imageIndex":0},{"imageOffset":42753,"symbol":"dyld4::halt(char const*, dyld4::StructuredError const*)","symbolLocation":335,"imageIndex":0},{"imageOffset":30754,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":4189,"imageIndex":0},{"imageOffset":26514,"symbol":"dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const","symbolLocation":572,"imageIndex":0},{"imageOffset":25215,"symbol":"start","symbolLocation":1727,"imageIndex":0}]},{"id":1287990,"name":"com.apple.rosetta.exceptionserver","threadState":{"flavor":"x86_THREAD_STATE","rbp":{"value":9908489551872},"r12":{"value":0},"rosetta":{"tmp2":{"value":0},"tmp1":{"value":0},"tmp0":{"value":0}},"rbx":{"value":0},"r8":{"value":2307},"r15":{"value":0},"r10":{"value":4470432580},"rdx":{"value":0},"rdi":{"value":0},"r9":{"value":4470432612},"r13":{"value":0},"rflags":{"value":515},"rax":{"value":268451845},"rsp":{"value":0},"r11":{"value":0},"rcx":{"value":17314086914},"r14":{"value":0},"rsi":{"value":2616}},"frames":[{"imageOffset":16032,"imageIndex":1}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 8634298368,
    "size" : 573440,
    "uuid" : "7e2d5f84-ffff-ffff-83cb-dd7bd247f06a",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 140703126241280,
    "size" : 196608,
    "uuid" : "6a360c41-fffff-fffff-b7d2-055dddac0786",
    "path" : "\/usr\/libexec\/rosetta\/runtime",
    "name" : "runtime"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4469895168,
    "size" : 425984,
    "uuid" : "4cb71c5f-4e41-3ce6-a65a-b283bc4bfab5",
    "path" : "\/Library\/Apple\/*\/libRosettaRuntime",
    "name" : "libRosettaRuntime"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4335554560,
    "size" : 8192,
    "uuid" : "0b92d5cf-68d1-ffff-ffff-b4eec7073798",
    "path" : "\/Applications\/Alpaca.app\/Contents\/Resources\/venv\/bin\/python3",
    "name" : "python3"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "sharedCache" : {
  "base" : 140703416139776,
  "size" : 25769803776,
  "uuid" : "a808c443-7710-3b25-8053-c8076aa3c7c8"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1532K resident=0K(0%) swapped_out_or_unallocated=1532K(100%)\nWritable regions: Total=166.0M written=177K(0%) resident=177K(0%) swapped_out=0K(0%) unallocated=165.9M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nRosetta Arena                     4096K        2 \nRosetta Generic                    928K      229 \nRosetta IndirectBranch              32K        1 \nRosetta JIT                      128.0M        1 \nRosetta Return Stack                20K        2 \nRosetta Thread Context              20K        2 \nStack                             8176K        1 \nStack Guard                       56.0M        1 \nVM_ALLOCATE                          4K        1 \nVM_ALLOCATE (reserved)               8K        2         reserved VM address space (unallocated)\n__DATA                              96K        6 \n__DATA_CONST                        28K        2 \n__DATA_DIRTY                         8K        2 \n__LINKEDIT                         400K        8 \n__TEXT                            1176K        4 \n__TPRO_CONST                       276K        1 \nmapped file                       1160K        7 \npage table in kernel               177K        1 \n===========                     =======  ======= \nTOTAL                            200.2M      273 \nTOTAL, minus reserved VM space   200.2M      273 \n",
  "legacyInfo" : {
  "threadTriggered" : {

  }
},
  "logWritingSignature" : "ff8165b7e20f8fcff2924fc7d4a86b01b83f8d63",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "63f9578e238e7b23a1f3030a",
      "factorPackIds" : {

      },
      "deploymentId" : 240000005
    },
    {
      "rolloutId" : "60da5e84ab0ca017dace9abf",
      "factorPackIds" : {

      },
      "deploymentId" : 240000008
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8",
      "experimentId" : "6643969b3099cf28e049862f",
      "deploymentId" : 400000007
    }
  ]
},
  "reportNotes" : [
  "PC register does not match crashing frame (0x0 vs 0x202C37A84)"
]
}

Model: Mac15,3, BootROM 11881.61.3, proc 8:4:4 processors, 8 GB, SMC 
Graphics: Apple M3, Apple M3, Built-In
Display: Color LCD, 3024 x 1964 Retina, Main, MirrorOff, Online
Memory Module: LPDDR5, Micron
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4388), wl0: Oct 31 2024 06:18:43 version 23.10.900.20.41.51.176 FWID 01-24228154
IO80211_driverkit-1345.8 "IO80211_driverkit-1345.8" Nov  9 2024 17:02:32
AirPort: 
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.

CodingKoalaGeneral avatar Dec 29 '24 18:12 CodingKoalaGeneral

For whatever reason this is trying to load the python library from /Volumes/Alpaca/Alpaca.app/Contents/Resources/venv/Python3 instead of /Volumes/Alpaca/Alpaca.app/Contents/Resources/venv/bin/python3

Is this just a typo in the code somewhere?

dyld[59270]: Library not loaded: @executable_path/../Python3
  Referenced from: <0B92D5CF-68D1-3BE2-A9C2-B4EEC7073798> /Volumes/Alpaca/Alpaca.app/Contents/Resources/venv/bin/python3
  Reason: tried: '/Volumes/Alpaca/Alpaca.app/Contents/Resources/venv/Python3' (no such file)
zsh: abort      /Volumes/Alpaca/Alpaca.app/Contents/MacOS/Alpaca

SolarisEclipse avatar Jan 11 '25 16:01 SolarisEclipse

If y'all want parsec access to a real Mac I don't mind contributing that.

SolarisEclipse avatar Jan 11 '25 16:01 SolarisEclipse

As you can see there really is no existing file there.

Screenshot 2025-01-11 at 11 24 00 AM

SolarisEclipse avatar Jan 11 '25 16:01 SolarisEclipse