[corenlp] some fixes to Dockerfile

parent 3a2b2079
Pipeline #7733 failed with stages
in 43 minutes and 28 seconds
......@@ -36,10 +36,12 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -o pipefail && \
locale-gen en_US.UTF-8 && \
bash <(curl -L https://releases.nixos.org/nix/nix-2.26.3/install) --no-daemon && \
bash <(curl -L https://releases.nixos.org/nix/nix-2.29.1/install) --no-daemon && \
chown root -R /nix && \
. "$HOME/.nix-profile/etc/profile.d/nix.sh" && \
mkdir -vp "$HOME/.config/nix" && echo "experimental-features = nix-command flakes" >> $HOME/.config/nix/nix.conf && \
# prefetch corenlp
nix build 'git+https://gitlab.iscpif.fr/gargantext/corenlp-nix.git' && \
mkdir -p "/builds/gargantext/" && chmod 777 -R "/builds/gargantext" && \
echo "source $HOME/.nix-profile/etc/profile.d/nix.sh" >> "$HOME/.bashrc" && \
echo `which nix-env` && \
......
......@@ -34,10 +34,11 @@ startCoreNLPServer = do
, create_group = True
, std_out = UseHandle devNull
, std_err = UseHandle devNull
}) `catch` \e -> case e of
_ | True <- "does not exist" `isInfixOf` (T.pack . show @SomeException $ e)
-> fail $ "Cannot execute the 'corenlp' via nix flakes. Make sure you are in a nix environment."
| otherwise -> throwIO e
}) `catch` \e ->
case e of
_ | True <- "does not exist" `isInfixOf` (T.pack . show @SomeException $ e)
-> fail $ "Cannot execute the 'corenlp' via nix flakes. Make sure you are in a nix environment."
| otherwise -> throwIO e
pure hdl
killProcessTree :: ProcessHandle -> IO ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment