Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
e1be02d6
Verified
Commit
e1be02d6
authored
Mar 06, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[nix] corenlp module improvements
parent
7ea853a7
Pipeline
#7414
passed with stages
in 43 minutes and 53 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
35 deletions
+48
-35
.gitlab-ci.yml
.gitlab-ci.yml
+0
-5
corenlp.nix
nix/corenlp.nix
+46
-29
pkgs.nix
nix/pkgs.nix
+2
-1
No files found.
.gitlab-ci.yml
View file @
e1be02d6
...
...
@@ -8,7 +8,6 @@ variables:
STACK_OPTS
:
"
--system-ghc"
STORE_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
CABAL_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
#CORENLP: "4.5.8"
FF_USE_FASTZIP
:
"
true"
ARTIFACT_COMPRESSION_LEVEL
:
"
fast"
CACHE_COMPRESSION_LEVEL
:
"
fast"
...
...
@@ -99,9 +98,6 @@ test:
chown -R test:test /root/.cache/cabal/packages/hackage.haskell.org/
chown -R test:test "$TEST_TMPDIR"
#mkdir -p /builds/gargantext/haskell-gargantext/devops/coreNLP/stanford-corenlp-current
#cp -R /root/devops/coreNLP/stanford-corenlp-${CORENLP}/* /builds/gargantext/haskell-gargantext/devops/coreNLP/stanford-corenlp-current/
nix-shell --run "chown -R test:test /root/.config/ && su -m test -c \"export PATH=$PATH:$TEST_NIX_PATH && export TMPDIR=$TEST_TMPDIR && cd /builds/gargantext/haskell-gargantext; $CABAL --store-dir=$STORE_DIR v2-test --test-show-details=streaming --flags 'test-crypto no-phylo-debug-logs' --ghc-options='-O0 -fclear-plugins'\""
chown -R root:root dist-newstyle/
...
...
@@ -109,4 +105,3 @@ test:
chown -R root:root $STORE_DIR
chown -R root:root /root/.cache/cabal/logs/
chown -R root:root /root/.cache/cabal/packages/hackage.haskell.org/
#chown -Rh root:root /builds/gargantext/haskell-gargantext/devops/coreNLP/stanford-corenlp-current
nix/corenlp.nix
View file @
e1be02d6
# https://nixos.wiki/wiki/Java
{
fetchzip
,
makeWrapper
,
stdenv
,
writeShellScript
,
jre
,
...
...
@@ -8,34 +10,49 @@
hash
?
"sha256-HZHNyw+LrxAN4OLueAhyxRG2onPWNMm5MwJDLLzsE2M="
}:
let
file_name
=
"stanford-corenlp-
${
version
}
.zip"
;
url
=
"http://nlp.stanford.edu/software/
${
file_name
}
"
;
zip_file
=
fetchzip
{
inherit
url
hash
;
};
start_server
=
writeShellScript
"startCoreNLPServer.sh"
''
PORT=9000
while getopts ':p:h' opt; do
case $opt in
(p) PORT=$OPTARG;;
(h) echo "$(basename $0) [-p 9000]"
exit 0
;;
esac
done
shift "$((OPTIND - 1))"
stdenv
.
mkDerivation
(
finalAttrs
:
let
startServer
=
writeShellScript
"startCoreNLPServer.sh"
''
set -x
PORT=9000
while getopts ':p:h' opt; do
case $opt in
(p) PORT=$OPTARG;;
(h) echo "$(basename $0) [-p 9000]"
exit 0
;;
esac
done
shift "$((OPTIND - 1))"
${
jre
}
/bin/java -mx4g -cp "
${
zip_file
}
/*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port $PORT -timeout 15000
''
;
in
${
jre
}
/bin/java -mx4g -cp "$CORENLP_PATH/*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port $PORT -timeout 15000 "$@"
''
;
in
stdenv
.
mkDerivation
rec
{
name
=
"corenlp"
;
inherit
version
;
phases
=
"installPhase"
;
installPhase
=
''
mkdir -p $out/bin
cp
${
start_server
}
$out/bin/startCoreNLPServer.sh
''
;
}
{
name
=
"corenlp"
;
inherit
version
;
src
=
fetchzip
{
inherit
hash
;
url
=
"http://nlp.stanford.edu/software/stanford-corenlp-
${
finalAttrs
.
version
}
.zip"
;
};
buildInputs
=
[
jre
];
nativeBuildInputs
=
[
makeWrapper
];
phases
=
[
"unpackPhase"
"installPhase"
];
installPhase
=
''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/share/corenlp
cp -r . $out/share/corenlp
makeWrapper
${
startServer
}
$out/bin/startCoreNLPServer.sh \
--set CORENLP_PATH "$out/share/corenlp"
runHook postInstall
''
;
}
)
nix/pkgs.nix
View file @
e1be02d6
...
...
@@ -89,7 +89,8 @@ rec {
});
corenlp
=
pkgs
.
callPackage
./corenlp.nix
{
};
corenlp
=
pkgs
.
callPackage
./corenlp.nix
{
};
# 4.5.8
# corenlp454 = pkgs.callPackage ./corenlp.nix { version = "4.5.4"; hash = "sha256-SViN/2TcDQrL+3RwUhbCTJDxqffhiWjutZE4oj++aIw="; }
hsBuildInputs
=
[
ghc966
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment