<div dir="ltr">The performance might not be what you're looking for (there are some more performant configurations but they might not be cost effective), but it's pretty easy to get a stack project running on Heroku - this script took ~3 minutes (dominated by installing GHC on the first push) to get a simple worker running in the cloud:<div><br></div><div><a href="https://gist.github.com/mfine/b3dd21cfd03d1775084780f955cdc784#gistcomment-2151378">https://gist.github.com/mfine/b3dd21cfd03d1775084780f955cdc784#gistcomment-2151378</a><br></div><div><br></div><div>Sample run:</div><div><br></div><div><pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:11.9px;margin-top:0px;margin-bottom:0px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-radius:3px;word-break:normal;color:rgb(36,41,46)"><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span> $ stack new worker <a href="https://gist.githubusercontent.com/mfine/b3dd21cfd03d1775084780f955cdc784/raw/4779a2ea55ac29b469a98eedfba35f74ba7785dc/worker.hsfiles">https://gist.githubusercontent.com/mfine/b3dd21cfd03d1775084780f955cdc784/raw/4779a2ea55ac29b469a98eedfba35f74ba7785dc/worker.hsfiles</a>
Downloading template <span class="gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">"</span><a href="https://gist.githubusercontent.com/mfine/b3dd21cfd03d1775084780f955cdc784/raw/522fc42d9c7a46e26673a73fae629c92c28da648/worker.hsfiles">https://gist.githubusercontent.com/mfine/b3dd21cfd03d1775084780f955cdc784/raw/522fc42d9c7a46e26673a73fae629c92c28da648/worker.hsfiles</a><span class="gmail-pl-pds" style="box-sizing:border-box">"</span></span> to create project <span class="gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">"</span>worker<span class="gmail-pl-pds" style="box-sizing:border-box">"</span></span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">in</span> worker/ ...
Looking <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">for</span> .cabal or package.yaml files to use to init the project.
Using cabal packages:
- worker/worker.cabal

Selecting the best among 10 snapshots...

<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">*</span> Matches lts-8.23

Selected resolver: lts-8.23
Initialising configuration using resolver: lts-8.23
Total number of user packages considered: 1
Writing configuration to file: worker/stack.yaml
All done.
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span> $
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span> $ <span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">cd</span> worker
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $ git init <span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">.</span>
Initialized empty Git repository <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">in</span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker/.git/
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $ git add <span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">.</span>
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $ git commit -m <span class="gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">"</span>initial<span class="gmail-pl-pds" style="box-sizing:border-box">"</span></span>
[master (root-commit) a19a152] initial
 4 files changed, 84 insertions(+)
 create mode 100644 Procfile
 create mode 100644 main.hs
 create mode 100644 stack.yaml
 create mode 100644 worker.cabal
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $ heroku create --buildpack <a href="https://github.com/mfine/heroku-buildpack-stack.git">https://github.com/mfine/heroku-buildpack-stack.git</a>                                                                         
Creating app... done, ⬢ serene-earth-29336
Setting buildpack to <a href="https://github.com/mfine/heroku-buildpack-stack.git.">https://github.com/mfine/heroku-buildpack-stack.git.</a>.. <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">done</span>
<a href="https://serene-earth-29336.herokuapp.com/">https://serene-earth-29336.herokuapp.com/</a> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">|</span> <a href="https://git.heroku.com/serene-earth-29336.git">https://git.heroku.com/serene-earth-29336.git</a>
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $ git push heroku master
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 1.61 KiB <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">|</span> 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)
remote: Compressing <span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">source</span> files... done.
remote: Building source:
remote: 
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> Haskell app detected
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_02:58:20 Starting...
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_02:58:20 Exporting config vars
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_02:58:20 Installing libgmp-6.0.0a into cache
remote: <span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(106,115,125)"><span class="gmail-pl-c" style="box-sizing:border-box">#</span>####################################################################### 100.0%</span>
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_02:58:20 Restoring 6.0.0a files from cache
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_02:58:20 Downloading stack-1.4.0
remote: <span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(106,115,125)"><span class="gmail-pl-c" style="box-sizing:border-box">#</span>####################################################################### 100.0%</span>
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_02:58:21 Restoring stack-1.4.0
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_02:58:21 Substituting stack vars
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_02:58:21 Running stack
remote: Downloading lts-8.23 build plan ...
remote: Downloaded lts-8.23 build plan.
remote: Updating package index Hackage (mirrored at <a href="https://s3.amazonaws.com/hackage.fpcomplete.com/">https://s3.amazonaws.com/hackage.fpcomplete.com/</a>) ...
remote: Selected mirror <a href="https://s3.amazonaws.com/hackage.fpcomplete.com/">https://s3.amazonaws.com/hackage.fpcomplete.com/</a>
remote: Downloading root
remote: Selected mirror <a href="https://s3.amazonaws.com/hackage.fpcomplete.com/">https://s3.amazonaws.com/hackage.fpcomplete.com/</a>
remote: Downloading timestamp
remote: Downloading snapshot
remote: Downloading mirrors
remote: Cannot update index (no <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">local</span> copy)
remote: Downloading index
remote: Updated package list downloaded
remote: Populating index cache ...
remote: Populated index cache.
remote: Preparing to install GHC to an isolated location.
remote: This will not interfere with any system-level installation.
remote: Preparing to download ghc-8.0.2 ...
remote: ghc-8.0.2: download has begun
remote: ghc-8.0.2:   27.84 MiB / 107.55 MiB ( 25.89%) downloaded...
remote: ghc-8.0.2:   54.10 MiB / 107.55 MiB ( 50.31%) downloaded...
remote: ghc-8.0.2:   77.99 MiB / 107.55 MiB ( 72.52%) downloaded...
remote: ghc-8.0.2:  101.87 MiB / 107.55 MiB ( 94.72%) downloaded...
remote: ghc-8.0.2:  107.55 MiB / 107.55 MiB (100.00%) downloaded...
remote: Downloaded ghc-8.0.2.
remote: Unpacking GHC into /app/tmp/cache/.stack/programs/x86_64-linux/ghc-8.0.2.temp/ ...
remote: Configuring GHC ...
remote: Installing GHC ...
remote: Installed GHC.
remote: stack will use a sandboxed GHC it installed
remote: For more information on paths, see <span class="gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">'</span>stack path<span class="gmail-pl-pds" style="box-sizing:border-box">'</span></span> and <span class="gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">'</span>stack exec env<span class="gmail-pl-pds" style="box-sizing:border-box">'</span></span>
remote: To use this GHC and packages outside of a project, consider using:
remote: stack ghc, stack ghci, stack runghc, or stack <span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">exec</span>
remote: [1 of 2] Compiling Main             ( /app/tmp/cache/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /app/tmp/cache/.stack/setup-exe-src/setup-mPHDZzAJ.o )
remote: [2 of 2] Compiling StackSetupShim   ( /app/tmp/cache/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /app/tmp/cache/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
remote: Linking /app/tmp/cache/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 ...
remote: worker-0.1.0.0: configure (exe)
remote: Configuring worker-0.1.0.0...
remote: worker-0.1.0.0: build (exe)
remote: Preprocessing executable <span class="gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">'</span>worker<span class="gmail-pl-pds" style="box-sizing:border-box">'</span></span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">for</span> worker-0.1.0.0...
remote: [1 of 1] Compiling Main             ( main.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/worker/worker-tmp/Main.o )
remote: Linking .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/worker/worker ...
remote: worker-0.1.0.0: copy/register
remote: Installing executable(s) <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">in</span>
remote: /app/.stack-work/install/x86_64-linux/lts-8.23/8.0.2/bin
remote: Copying from /app/.stack-work/install/x86_64-linux/lts-8.23/8.0.2/bin/worker to /app/.local/bin/worker
remote: 
remote: Copied executables to /app/.local/bin:
remote: - worker
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_03:01:26 Making stack binaries available
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_03:01:26 Caching .stack-work
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> 2017-07-19_03:01:26 Finished<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">!</span>
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> Discovering process types
remote:        Procfile declares types -<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> worker
remote: 
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> Compressing...
remote:        Done: 1.5M
remote: -----<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> Launching...
remote:        Released v3
remote:        <a href="https://serene-earth-29336.herokuapp.com/">https://serene-earth-29336.herokuapp.com/</a> deployed to Heroku
remote: 
remote: Verifying deploy... done.
To <a href="https://git.heroku.com/serene-earth-29336.git">https://git.heroku.com/serene-earth-29336.git</a>
 <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">*</span> [new branch]      master -<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">></span> master
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $ heroku ps:scale worker+1
Scaling dynos... done, now running worker at 1:Free
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">~</span>/worker $ heroku logs -t
2017-07-19T03:07:19.755903+00:00 heroku[worker.1]: Starting process with <span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">command</span> <span class="gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">`</span>worker<span class="gmail-pl-pds" style="box-sizing:border-box">`</span></span>
2017-07-19T03:07:20.553903+00:00 heroku[worker.1]: State changed from starting to up
2017-07-19T03:07:22.393957+00:00 app[worker.1]: Hello<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">!</span>
2017-07-19T03:07:23.397139+00:00 app[worker.1]: Hello<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">!</span>
2017-07-19T03:07:24.398803+00:00 app[worker.1]: Hello<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">!</span>
2017-07-19T03:07:25.400211+00:00 app[worker.1]: Hello<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">!</span>
2017-07-19T03:07:26.405199+00:00 app[worker.1]: Hello<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">!</span></pre></div><div><br></div><div>Mark</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 16, 2017 at 1:20 PM, Dennis Raddle <span dir="ltr"><<a href="mailto:dennis.raddle@gmail.com" target="_blank">dennis.raddle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm thinking of using cloud computing services for running my CPU-intensive parallel Haskell code, in order to get results faster. Instead of buying a faster computer, I would take advantage of existing services. <div><br></div><div>Note that my budget is small, so I need something that doesn't have a large minimum charge. I'm thinking $10 - 30 per month.</div><div><br></div><div>Are there any cloud services like that that run Haskell?</div><span class="HOEnZb"><font color="#888888"><div>D</div><div><br></div></font></span></div>
<br>______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.<br></blockquote></div><br></div>