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
155
Issues
155
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
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:
...
@@ -8,7 +8,6 @@ variables:
STACK_OPTS
:
"
--system-ghc"
STACK_OPTS
:
"
--system-ghc"
STORE_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
STORE_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
CABAL_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
CABAL_DIR
:
"
${CI_PROJECT_DIR}/.cabal"
#CORENLP: "4.5.8"
FF_USE_FASTZIP
:
"
true"
FF_USE_FASTZIP
:
"
true"
ARTIFACT_COMPRESSION_LEVEL
:
"
fast"
ARTIFACT_COMPRESSION_LEVEL
:
"
fast"
CACHE_COMPRESSION_LEVEL
:
"
fast"
CACHE_COMPRESSION_LEVEL
:
"
fast"
...
@@ -99,9 +98,6 @@ test:
...
@@ -99,9 +98,6 @@ test:
chown -R test:test /root/.cache/cabal/packages/hackage.haskell.org/
chown -R test:test /root/.cache/cabal/packages/hackage.haskell.org/
chown -R test:test "$TEST_TMPDIR"
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'\""
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/
chown -R root:root dist-newstyle/
...
@@ -109,4 +105,3 @@ test:
...
@@ -109,4 +105,3 @@ test:
chown -R root:root $STORE_DIR
chown -R root:root $STORE_DIR
chown -R root:root /root/.cache/cabal/logs/
chown -R root:root /root/.cache/cabal/logs/
chown -R root:root /root/.cache/cabal/packages/hackage.haskell.org/
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
# https://nixos.wiki/wiki/Java
{
fetchzip
,
{
fetchzip
,
makeWrapper
,
stdenv
,
stdenv
,
writeShellScript
,
writeShellScript
,
jre
,
jre
,
...
@@ -8,34 +10,49 @@
...
@@ -8,34 +10,49 @@
hash
?
"sha256-HZHNyw+LrxAN4OLueAhyxRG2onPWNMm5MwJDLLzsE2M="
hash
?
"sha256-HZHNyw+LrxAN4OLueAhyxRG2onPWNMm5MwJDLLzsE2M="
}:
}:
let
stdenv
.
mkDerivation
(
finalAttrs
:
file_name
=
"stanford-corenlp-
${
version
}
.zip"
;
let
url
=
"http://nlp.stanford.edu/software/
${
file_name
}
"
;
startServer
=
writeShellScript
"startCoreNLPServer.sh"
''
zip_file
=
fetchzip
{
inherit
url
hash
;
};
set -x
start_server
=
writeShellScript
"startCoreNLPServer.sh"
''
PORT=9000
PORT=9000
while getopts ':p:h' opt; do
while getopts ':p:h' opt; do
case $opt in
case $opt in
(p) PORT=$OPTARG;;
(p) PORT=$OPTARG;;
(h) echo "$(basename $0) [-p 9000]"
(h) echo "$(basename $0) [-p 9000]"
exit 0
exit 0
;;
;;
esac
esac
done
done
shift "$((OPTIND - 1))"
shift "$((OPTIND - 1))"
${
jre
}
/bin/java -mx4g -cp "
${
zip_file
}
/*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port $PORT -timeout 15000
${
jre
}
/bin/java -mx4g -cp "$CORENLP_PATH/*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port $PORT -timeout 15000 "$@"
''
;
''
;
in
in
stdenv
.
mkDerivation
rec
{
{
name
=
"corenlp"
;
name
=
"corenlp"
;
inherit
version
;
inherit
version
;
phases
=
"installPhase"
;
src
=
fetchzip
{
installPhase
=
''
inherit
hash
;
mkdir -p $out/bin
url
=
"http://nlp.stanford.edu/software/stanford-corenlp-
${
finalAttrs
.
version
}
.zip"
;
cp
${
start_server
}
$out/bin/startCoreNLPServer.sh
};
''
;
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 {
...
@@ -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
=
[
hsBuildInputs
=
[
ghc966
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