2

I'm trying to run duckling (https://github.com/facebook/duckling) on a Windows server.

Unfortunately, the server only has intranet access and no internet access. How do I set up Haskell to be able to build and run a package without internet access?

atotalnoob
  • 249
  • 2
  • 16
  • Can you build your binary on a different machine, and then just copy the binary over? I've done this, building Windows binaries from virtualbox on Linux. – unhammer Aug 21 '18 at 12:59

1 Answers1

6

The first method that comes to mind is using a same architecture machine that does have internet access to fetch the toolchain and dependencies, before transferring those to the offline build machine. Something like using stack build --prefetch --install-ghc --dry-run, then copying the stack tool, stack root, compiler (listed by stack path) and your project. I suspect someone has made a better procedure for this.

Some discussion: https://github.com/commercialhaskell/stack/issues/359 https://groups.google.com/forum/#!topic/haskell-stack/LHG9DSrz8k8

Another option might be setting up your own mirror of the packages, and pointing stack to those using options like latest-snapshot-url and package-indices. offline-stack appears to collect some steps of this.

Yann Vernier
  • 15,414
  • 2
  • 28
  • 26
  • So does same architecture refer to the same CPU architecture (like AVX) or same as in operating system? – atotalnoob Aug 07 '18 at 23:38
  • Probably both. Otherwise you'd have to start at bootstrapping the compiler. Might be more along the level of amd64 or x86 rather than specific extensions like AVX, though. – Yann Vernier Aug 08 '18 at 11:52