Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load.ivy through HTTP/HTTPS proxy for Spark setup #21

Closed
rvernica opened this issue Aug 7, 2015 · 5 comments
Closed

load.ivy through HTTP/HTTPS proxy for Spark setup #21

rvernica opened this issue Aug 7, 2015 · 5 comments

Comments

@rvernica
Copy link

rvernica commented Aug 7, 2015

I am following the Spark setup instructions listed in Spark.ipynb. How can I configure load.ivy to go through an HTTP/HTTPS proxy for donwloading?

Thanks!

@rvernica
Copy link
Author

rvernica commented Aug 7, 2015

If I set the HTTP/HTTPS proxy in SBT_OPTS before starting Ammonite, the the load.ivy call works from Ammonite:

SBT_OPTS="-Dhttp.proxyHost=... -Dhttp.proxyPort=... -Dhttps.proxyHost=... -Dhttps.proxyPort=..." ./amm
Loading Ammonite Repl...
@ load.ivy("com.github.alexarchambault" % "ammonite-spark_1.3_2.10.5" % "0.3.1-S  NAPSHOT")

@ 

@alexarchambault
Copy link
Member

(Initial answer was buggy, now fixed)

You can try editing ~/.ipython/kernels/scala211/kernel.json, and add the options there:

{
  "language" : "scala211",
  "display_name" : "Scala 2.11",
  "argv" : [
    "/path/to/jupyter-scala_2.11.6-0.2.0-SNAPSHOT/bin/jupyter-scala",
    "--quiet",
    "--connection-file",
    "{connection_file}"
  ],
  "env": {
    "JVM_OPT": "-Dhttp.proxyHost=... -Dhttp.proxyPort=... -Dhttps.proxyHost=... -Dhttps.proxyPort=..."
  }
}

I haven't tested these exact options myself, but that's how one can provide java options to the kernel.

@alexarchambault
Copy link
Member

Alternatively, you can try to edit the jupyter-scala script directly (its path is in kernel.json above), and add the options at the end, close to the current java options (like -D...).

@rvernica
Copy link
Author

Thanks! It worked.

@cequencer
Copy link

I noticed this solution worked 3 years ago, but now the jupyter-scala is using couriser to download all the runtime dependencies and artifacts. I have tried the proposed method here, but it no longer works with couriser. I have provided more attempts and clues in issue #189. It will be great if @alexarchambault can revisit this either issue with the new codebase using couriser. Many thanks and sorry for trolling an closed issue from the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants