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

new file: packages/odnnr/odnnr.2.0.3/opam #23309

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/odnnr/odnnr.2.0.3/files/install_keras.r
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# for keras and tensorflow, let's assume the user has installed them in
# user-space as a prerequisite using 'pip3 install tensorflow keras'
# here, we just test that the keras library can be loaded in R
pkg <- 'keras'
if (!require(pkg, character.only = TRUE)) {
install.packages(pkg, dependencies = TRUE, repos='http://cran.r-project.org')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this pattern is everywhere in your R-related packages, and I’ve kinda let that slip under the rug for all those years but how is this supposed to work without network access? (sandbox)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No: no network access implies you cannot install these.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the sandbox too tight, if we cannot download listed things at install time?
Of course, R will also download all the required dependencies...

}
library(keras)
46 changes: 46 additions & 0 deletions packages/odnnr/odnnr.2.0.3/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
opam-version: "2.0"
maintainer: "[email protected]"
authors: ["Francois Berenger"]
homepage: "https://github.com/UnixJunkie/odnnr"
bug-reports: "https://github.com/UnixJunkie/odnnr/issues"
dev-repo: "git+https://github.com/UnixJunkie/odnnr.git"
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
install: ["R" "CMD" "BATCH" "install_keras.r"]
build: ["dune" "build" "-p" name "-j" jobs]
depends: [
"ocaml"
"conf-r"
"dune" {>= "1.11.0"}
"dolog" {>= "4.0.0"}
"batteries"
"minicli" {>= "5.0.0"}
"parany" {>= "11.0.2"}
"cpm"
"conf-gnuplot"
]
x-ci-accept-failures: ["debian-unstable"]
synopsis: "Regressor using a Deep Neural Network"
description: """
Some OCaml functions to drive the Deep Learning R 'keras' package;
but only for training a regressor using a multi-layer perceptron.
This package really fires up and talks to an R interpreter.

Bibliography:
=============
Deep Learning with R. François Chollet with J. J. Allaire.
January 2018, ISBN 9781617295546.
"""
post-messages:
"""
Please interact with pip3 then R to install required dependencies in user-space:
pip3 install tensorflow keras
R
install.packages('keras', repos='http://cran.r-project.org')
library(keras)""" {failure}
extra-files: [
["install_keras.r" "md5=ad1bb71c78db06e7a38b24ec6b34273d"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is missing

]
url {
src: "https://github.com/UnixJunkie/odnnr/archive/v2.0.3.tar.gz"
checksum: "md5=aa79807cfd13aeb93e5af74215856b78"
}