tensorflow / haskell

Haskell bindings for TensorFlow
https://tensorflow.github.io/haskell/haddock/
Apache License 2.0
1.58k stars 196 forks source link

problems getting started... #294

Open nyck33 opened 6 months ago

nyck33 commented 6 months ago
(gorilla-env) nyck33@lenovo-15ACH6:~/haskell/tensorflow-haskell$ docker build -t tensorflow/haskell:2.12.0 docker
# TODO: move the setup step to the docker script.
stack --docker setup
stack --docker test
[+] Building 3.8s (10/10) FINISHED                      docker:desktop-linux
 => [internal] load build definition from Dockerfile                    0.0s
 => => transferring dockerfile: 1.41kB                                  0.0s
 => [internal] load metadata for docker.io/tensorflow/tensorflow:2.12.  2.4s
 => [auth] tensorflow/tensorflow:pull token for registry-1.docker.io    0.0s
 => [internal] load .dockerignore                                       0.0s
 => => transferring context: 2B                                         0.0s
 => [1/5] FROM docker.io/tensorflow/tensorflow:2.12.0@sha256:7263b3490  0.0s
 => CACHED [2/5] RUN apt-get update                                     0.0s
 => CACHED [3/5] RUN apt-get install -y         libsnappy-dev           0.0s
 => CACHED [4/5] RUN dpkg-reconfigure locales &&     locale-gen en_US.  0.0s
 => CACHED [5/5] RUN     curl -O -L https://github.com/google/protobuf  0.0s
 => exporting to image                                                  0.1s
 => => exporting layers                                                 0.0s
 => => writing image sha256:bb2bda9fea8f44499fcc0c67b55b81c10118345b48  0.0s
 => => naming to docker.io/tensorflow/haskell:2.12.0                    0.0s

What's Next?
  View a summary of image vulnerabilities and recommendations → docker scout quickview
Preparing to install GHC (tinfo6-libc6-pre232) to an isolated location. This
will not interfere with any system-level installation.
/home/nyck33/.stack/programs: createDirectory: permission denied (Permission denied)
Preparing to install GHC (tinfo6-libc6-pre232) to an isolated location. This
will not interfere with any system-level installation.
/home/nyck33/.stack/programs: createDirectory: permission denied (Permission denied)

tried

sudo chown -R nyck33:nyck33 /home/nyck33/.stack

I'm on Ubuntu 23.10.

nyck33 commented 6 months ago
base) nyck33@lenovo-15ACH6:~/haskell/tensorflow-haskell$ chmod -R 777 /home/nyck33/.stack
(base) nyck33@lenovo-15ACH6:~/haskell/tensorflow-haskell$ docker build -t tensorflow/haskell:2.12.0 docker
[+] Building 2.2s (10/10) FINISHED                      docker:desktop-linux
 => [internal] load build definition from Dockerfile                    0.0s
 => => transferring dockerfile: 1.41kB                                  0.0s
 => [internal] load metadata for docker.io/tensorflow/tensorflow:2.12.  2.0s
 => [auth] tensorflow/tensorflow:pull token for registry-1.docker.io    0.0s
 => [internal] load .dockerignore                                       0.0s
 => => transferring context: 2B                                         0.0s
 => [1/5] FROM docker.io/tensorflow/tensorflow:2.12.0@sha256:7263b3490  0.0s
 => CACHED [2/5] RUN apt-get update                                     0.0s
 => CACHED [3/5] RUN apt-get install -y         libsnappy-dev           0.0s
 => CACHED [4/5] RUN dpkg-reconfigure locales &&     locale-gen en_US.  0.0s
 => CACHED [5/5] RUN     curl -O -L https://github.com/google/protobuf  0.0s
 => exporting to image                                                  0.0s
 => => exporting layers                                                 0.0s
 => => writing image sha256:bb2bda9fea8f44499fcc0c67b55b81c10118345b48  0.0s
 => => naming to docker.io/tensorflow/haskell:2.12.0                    0.0s

What's Next?
  View a summary of image vulnerabilities and recommendations → docker scout quickview
(base) nyck33@lenovo-15ACH6:~/haskell/tensorflow-haskell$ stack --docker setup
Preparing to install GHC (tinfo6-libc6-pre232) to an isolated location. This
will not interfere with any system-level installation.
ghc-tinfo6-libc6-pre232-8.8.4:    7.23 MiB / 198.61 MiB (  3.64%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   17.50 MiB / 198.61 MiB (  8.81%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   26.50 MiB / 198.61 MiB ( 13.34%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   34.48 MiB / 198.61 MiB ( 17.36%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   44.53 MiB / 198.61 MiB ( 22.42%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   52.75 MiB / 198.61 MiB ( 26.56%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   61.78 MiB / 198.61 MiB ( 31.11%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   71.83 MiB / 198.61 MiB ( 36.16%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   79.56 MiB / 198.61 MiB ( 40.06%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   88.78 MiB / 198.61 MiB ( 44.70%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:   98.77 MiB / 198.61 MiB ( 49.73%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  106.08 MiB / 198.61 MiB ( 53.41%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  115.91 MiB / 198.61 MiB ( 58.36%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  125.84 MiB / 198.61 MiB ( 63.36%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  132.81 MiB / 198.61 MiB ( 66.87%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  143.05 MiB / 198.61 MiB ( 72.02%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  153.08 MiB / 198.61 MiB ( 77.07%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  159.95 MiB / 198.61 MiB ( 80.53%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  170.05 MiB / 198.61 MiB ( 85.62%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  179.41 MiB / 198.61 MiB ( 90.33%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  187.08 MiB / 198.61 MiB ( 94.19%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  197.16 MiB / 198.61 MiB ( 99.27%) downloaded.                                                                             ghc-tinfo6-libc6-pre232-8.8.4:  198.61 MiB / 198.61 MiB (100.00%) downloaded.                                                                             Downloaded ghc-tinfo6-libc6-pre232-8.8.4.
Unpacking GHC into /home/nyck33/.stack/programs/x86_64-linux-dkd1ce2ff9c9560b                                                                             /usr/bin/install: cannot create directory ‘/home/nyck33’: Permission denied
make[1]: *** [utils/hp2ps/ghc.mk:44: install_utils/hp2ps_dist-install_wrapper] Error 1
make: *** [Makefile:51: install] Error 2
Installing GHC ...

Error: [S-7441]
       Received ExitFailure 2 when running
       Raw command: /usr/bin/make install
       Run from: /home/nyck33/.stack/programs/x86_64-linux-dkd1ce2ff9c9560b648268df668d177711/ghc-tinfo6-libc6-pre232-8.8.4.temp/ghc-8.8.4/

       Error encountered while installing GHC with
         make install
         run in
         /home/nyck33/.stack/programs/x86_64-linux-dkd1ce2ff9c9560b648268df668d177711/ghc-tinfo6-libc6-pre232-8.8.4.temp/ghc-8.8.4/

       The following directories may now contain files, but won't be used by
       Stack:
       * /home/nyck33/.stack/programs/x86_64-linux-dkd1ce2ff9c9560b648268df668d177711/ghc-tinfo6-libc6-pre232-8.8.4.temp/
       * /home/nyck33/.stack/programs/x86_64-linux-dkd1ce2ff9c9560b648268df668d177711/ghc-tinfo6-libc6-pre232-8.8.4/

       For more information consider rerunning with --verbose flag.

(base) nyck33@lenovo-15ACH6:~/haskell/tensorflow-haskell$ 

Which directories do I need to set certain permissions on to get started? Is this normal to have these errors? I"m just asking because I'm wondering if something is wrong with my Ubuntu and Docker setup.