whishper icon indicating copy to clipboard operation
whishper copied to clipboard

[Bug] Install issue on Mac

Open notph opened this issue 1 year ago • 8 comments

Hi Pluja,

Getting some troubles with the install (macOS Sonoma RC)

Pulling and building docker images
2023/09/19 10:19:09 must use ASL logging (which requires CGO) if running as root
2023/09/19 10:19:09 must use ASL logging (which requires CGO) if running as root
2023/09/19 10:19:09 must use ASL logging (which requires CGO) if running as root
2023/09/19 10:19:09 must use ASL logging (which requires CGO) if running as root
2023/09/19 10:19:09 must use ASL logging (which requires CGO) if running as root
2023/09/19 10:19:09 must use ASL logging (which requires CGO) if running as root
[+] Pulling 0/0
 ⠋ mongo Pulling                                                                                                       0.0s 
 ⠋ whishper-backend Pulling                                                                                            0.0s 
 ⠋ whishper-frontend Pulling                                                                                           0.0s 
 ⠋ nginx Pulling                                                                                                       0.0s 
 ⠋ translate Pulling                                                                                                   0.0s 
 ⠋ transcription-api Pulling                                                                                           0.0s 
error getting credentials - err: exit status 1, out: ``

Thanks

notph avatar Sep 18 '23 22:09 notph

Fixed by editing get_whispher.sh, removing sudo before docker in code.

Found thanks to : #24 https://github.com/docker/compose/issues/9560#issuecomment-1370219176

notph avatar Sep 18 '23 22:09 notph

Now getting different issue :

` [+] Running 6/8 ✔ Network whispher_default Created 0.0s ✔ Container whispher-mongo-1 Start... 0.6s ⠿ Container whispher-postgres-1 St... 0.6s ✔ Container whisper-libretranslate Started 0.6s ⠿ Container whisper-api Starting 0.6s ✔ Container whishper-web Created 0.0s ✔ Container whishper-backend Creat... 0.0s ✔ Container whispher-nginx-1 Creat... 0.0s Error response from daemon: error while creating mount source path '/host_mnt/Users/xxxxxx/whispher/whishper_data/whisper_models': mkdir /host_mnt/Users/xxxxxx/whispher/whishper_data/whisper_models: permission denied

`

notph avatar Sep 19 '23 06:09 notph

Seems like there's a permission issue, sorry for the late reply. Did you sove the issue? If not, can you provide the result of commands id and ls -al in the whishper directory?

pluja avatar Sep 27 '23 10:09 pluja

Same issue.

ls -al whishper_data/
total 0
drwxr-xr-x   3 root  staff    96 Oct 18 21:31 ./
drwx------@ 48 andy  staff  1536 Oct 18 21:31 ../
drwxr-xr-x   4 root  staff   128 Oct 18 21:31 libretranslate/
id
uid=501(andy) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae),701(com.apple.sharepoint.group.1)

acarl005 avatar Oct 19 '23 01:10 acarl005

@acarl005 can you try setting the permission for libretranslate?

chown -R 1032:1032 whishper_data/libretranslate

pluja avatar Oct 23 '23 14:10 pluja

Removing sudo solved the issue for me. I had set Docker Desktop Advanced setting “configure the installation of Docker's CLI tools” to “User” beforehand as I was getting errors. This also required adding export PATH="$HOME/.docker/bin:$PATH" to my “.zshrc” file.

I also had to reset the permissions on the whishper root to my user. I used Finder to reset the entire hierarchy.

And finally, this is my modified mongo service YML:

  mongo:
    image: mongo
    env_file:
      - .env
    restart: unless-stopped
    volumes:
      - ./whishper_data/db_data:/data/db
      - ./whishper_data/db_data/logs/:/var/log/mongodb/
    environment:
      MONGO_INITDB_ROOT_USERNAME: ${DB_USER:-whishper}
      MONGO_INITDB_ROOT_PASSWORD: ${DB_PASS:-whishper}
    expose:
      - 27017
    command: ['--logpath', '/var/log/mongodb/mongod.log']
    healthcheck:
      test: echo 'db.runCommand({serverStatus:1}).ok' | mongo admin -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --quiet | grep 1
      interval: 2s
      timeout: 3s
      retries: 5
      start_period: 20s

BTW: It would be awesome to be able to rerun the scrip with a non-empty installation directory as removing it every time something went wrong was a bit of a chore.

Now I can open http://localhost:8082.

Thank you big time for making whishper available and supporting it!

JanX2 avatar Oct 29 '23 13:10 JanX2

Removing sudo from the install script worked on mac for me too.

RayBB avatar Nov 07 '23 22:11 RayBB

I tried this again on a fresh macOS Sonoma install using the manual method. This time I could use Docker in root (not rootless) mode. I also had to remove the sudo and use the Finder to reset the permission for the "whisper" root directory and all its objects. I would get these errors until I did that:

Error response from daemon: error while creating mount source path '/host_mnt/Users/dev/whishper/whishper_data/db_data': mkdir /host_mnt/Users/dev/whishper/whishper_data/db_data: permission denied

JanX2 avatar Dec 01 '23 17:12 JanX2