Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ml_solar_plates
modern_pipeline
ml_solar_plates_pipeline
Commits
1d206a38
Commit
1d206a38
authored
Mar 29, 2022
by
Yori Fournier
Browse files
making 01 based on wetty python3.9
parent
055c2dfd
Changes
11
Hide whitespace changes
Inline
Side-by-side
01-get-solar-plates/bin/install_filebrowser.sh
deleted
100755 → 0
View file @
055c2dfd
#!/usr/bin/env bash
#
# File Browser Installer Script
#
# GitHub: https://github.com/filebrowser/filebrowser
# Issues: https://github.com/filebrowser/filebrowser/issues
# Requires: bash, mv, rm, tr, type, grep, sed, curl/wget, tar (or unzip on OSX and Windows)
#
# This script installs File Browser to your path.
# Usage:
#
# $ curl -fsSL https://filebrowser.xyz/get.sh | bash
# or
# $ wget -qO- https://filebrowser.xyz/get.sh | bash
#
# In automated environments, you may want to run as root.
# If using curl, we recommend using the -fsSL flags.
#
# This should work on Mac, Linux, and BSD systems, and
# hopefully Windows with Cygwin. Please open an issue if
# you notice any bugs.
#
install_filemanager
()
{
trap
'echo -e "Aborted, error $? in command: $BASH_COMMAND"; trap ERR; return 1'
ERR
filemanager_os
=
"unsupported"
filemanager_arch
=
"unknown"
install_path
=
"/home/mlsolarplate/bin"
# Termux on Android has $PREFIX set which already ends with /usr
if
[[
-n
"
$ANDROID_ROOT
"
&&
-n
"
$PREFIX
"
]]
;
then
install_path
=
"
$PREFIX
/bin"
fi
# Fall back to /usr/bin if necessary
if
[[
!
-d
$install_path
]]
;
then
install_path
=
"/usr/bin"
fi
# Not every platform has or needs sudo (https://termux.com/linux.html)
((
EUID
))
&&
[[
-z
"
$ANDROID_ROOT
"
]]
&&
sudo_cmd
=
"sudo"
sudo_cmd
=
""
#########################
# Which OS and version? #
#########################
filemanager_bin
=
"filebrowser"
filemanager_dl_ext
=
".tar.gz"
# NOTE: `uname -m` is more accurate and universal than `arch`
# See https://en.wikipedia.org/wiki/Uname
unamem
=
"
$(
uname
-m
)
"
case
$unamem
in
*
aarch64
*
)
filemanager_arch
=
"arm64"
;;
*
64
*
)
filemanager_arch
=
"amd64"
;;
*
86
*
)
filemanager_arch
=
"386"
;;
*
armv5
*
)
filemanager_arch
=
"armv5"
;;
*
armv6
*
)
filemanager_arch
=
"armv6"
;;
*
armv7
*
)
filemanager_arch
=
"armv7"
;;
*
)
echo
"Aborted, unsupported or unknown architecture:
$unamem
"
return
2
;;
esac
unameu
=
"
$(
tr
'[:lower:]'
'[:upper:]'
<<<
$(
uname
))
"
if
[[
$unameu
==
*
DARWIN
*
]]
;
then
filemanager_os
=
"darwin"
elif
[[
$unameu
==
*
LINUX
*
]]
;
then
filemanager_os
=
"linux"
elif
[[
$unameu
==
*
FREEBSD
*
]]
;
then
filemanager_os
=
"freebsd"
elif
[[
$unameu
==
*
NETBSD
*
]]
;
then
filemanager_os
=
"netbsd"
elif
[[
$unameu
==
*
OPENBSD
*
]]
;
then
filemanager_os
=
"openbsd"
elif
[[
$unameu
==
*
WIN
*
||
$unameu
==
MSYS
*
]]
;
then
# Should catch cygwin
sudo_cmd
=
""
filemanager_os
=
"windows"
filemanager_bin
=
"filebrowser.exe"
filemanager_dl_ext
=
".zip"
else
echo
"Aborted, unsupported or unknown OS:
$uname
"
return
6
fi
########################
# Download and extract #
########################
echo
"Downloading File Browser for
$filemanager_os
/
$filemanager_arch
..."
if
type
-p
curl
>
/dev/null 2>&1
;
then
net_getter
=
"curl -fsSL"
elif
type
-p
wget
>
/dev/null 2>&1
;
then
net_getter
=
"wget -qO-"
else
echo
"Aborted, could not find curl or wget"
return
7
fi
filemanager_file
=
"
${
filemanager_os
}
-
$filemanager_arch
-filebrowser
$filemanager_dl_ext
"
filemanager_tag
=
"
$(
${
net_getter
}
https://api.github.com/repos/filebrowser/filebrowser/releases/latest |
grep
-o
'"tag_name": ".*"'
|
sed
's/"//g'
|
sed
's/tag_name: //g'
)
"
filemanager_url
=
"https://github.com/filebrowser/filebrowser/releases/download/
$filemanager_tag
/
$filemanager_file
"
echo
"
$filemanager_url
"
# Use $PREFIX for compatibility with Termux on Android
rm
-rf
"
$PREFIX
/tmp/
$filemanager_file
"
${
net_getter
}
"
$filemanager_url
"
>
"
$PREFIX
/tmp/
$filemanager_file
"
echo
"Extracting..."
case
"
$filemanager_file
"
in
*
.zip
)
unzip
-o
"
$PREFIX
/tmp/
$filemanager_file
"
"
$filemanager_bin
"
-d
"
$PREFIX
/tmp/"
;;
*
.tar.gz
)
tar
-xzf
"
$PREFIX
/tmp/
$filemanager_file
"
-C
"
$PREFIX
/tmp/"
"
$filemanager_bin
"
;;
esac
chmod
+x
"
$PREFIX
/tmp/
$filemanager_bin
"
echo
"Putting filemanager in
$install_path
(may require password)"
$sudo_cmd
mv
"
$PREFIX
/tmp/
$filemanager_bin
"
"
$install_path
/
$filemanager_bin
"
if
setcap_cmd
=
$(
PATH+
=
$PATH
:/sbin
type
-p
setcap
)
;
then
$sudo_cmd
$setcap_cmd
cap_net_bind_service
=
+ep
"
$install_path
/
$filemanager_bin
"
fi
$sudo_cmd
rm
--
"
$PREFIX
/tmp/
$filemanager_file
"
if
type
-p
$filemanager_bin
>
/dev/null 2>&1
;
then
echo
"Successfully installed"
trap
ERR
return
0
else
echo
"Something went wrong, File Browser is not in your path"
trap
ERR
return
1
fi
}
install_filemanager
01-get-solar-plates/dexplore.sh
deleted
100755 → 0
View file @
055c2dfd
#!/bin/bash
export
PATH
=
$PATH
:/home/mlsolarplate/bin
.
./env/bin/activate
# get filebrowser
./bin/install_filebrowser.sh
# run filebrowser
filebrowser
--noauth
--address
=
0.0.0.0
--port
=
1234
-r
/home/mlsolarplate/
01-get-solar-plates/install-user-deps.sh
0 → 100644
View file @
1d206a38
#!/bin/bash
# activate virtual env
.
${
HOME
}
/env/bin/activate
# install dependancies
pip
install
-r
setup/requirements.txt
01-get-solar-plates/parameters/.gitignore
deleted
100644 → 0
View file @
055c2dfd
secrets.toml
\ No newline at end of file
01-get-solar-plates/parameters/build-explorer-args.txt
deleted
100644 → 0
View file @
055c2dfd
--build-arg REPO_HOME=01-get-solar-plates
01-get-solar-plates/parameters/build-runner-args.txt
deleted
100644 → 0
View file @
055c2dfd
--build-arg REPO_HOME=01-get-solar-plates
01-get-solar-plates/parameters/run-args.txt
deleted
100644 → 0
View file @
055c2dfd
01-get-solar-plates/parameters/secrets.toml.sample
deleted
100644 → 0
View file @
055c2dfd
service_token = "place your token here"
\ No newline at end of file
01-get-solar-plates/requirements.txt
→
01-get-solar-plates/
setup/
requirements.txt
View file @
1d206a38
toml
i
==1.2.3
toml==1.2.3
pyvo==1.2.1
toml==0.10.2
urllib3==1.26.3
...
...
02-extract-features/parameters/build-args.txt
deleted
100644 → 0
View file @
055c2dfd
--build-arg REPO_HOME=02-extract-features --build-arg BRANCH=implement-shape
02-extract-features/parameters/run-args.txt
deleted
100644 → 0
View file @
055c2dfd
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