Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DSI Parser Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DigitalDynamicMeasurement
DSI Parser Frontend
Commits
4c9c7929
Commit
4c9c7929
authored
10 months ago
by
Benedikt
Browse files
Options
Downloads
Patches
Plain Diff
removed no working IP detection
parent
752538b0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dockerfile
+3
-5
3 additions, 5 deletions
dockerfile
startkBokehAndPrintIp.sh
+0
-39
0 additions, 39 deletions
startkBokehAndPrintIp.sh
with
3 additions
and
44 deletions
dockerfile
+
3
−
5
View file @
4c9c7929
...
...
@@ -3,15 +3,13 @@ FROM python:3.11
# WORKDIR /usr/src/app
ENV
GIT_SSL_NO_VERIFY=1
# Install net-tools for ifconfig
RUN
apt-get update
&&
\
apt-get
install
-y
net-tools
&&
\
rm
-rf
/var/lib/apt/lists/
*
# Install any needed packages specified in requirements.txt
RUN
git clone https://gitlab1.ptb.de/digitaldynamicmeasurement/dsi-parser-frontend.git
RUN
pip
install
--no-cache-dir
-r
dsi-parser-frontend/requirements.txt
EXPOSE
5020
CMD
["dsi-parser-frontend/startkBokehAndPrintIp.sh"]
#
CMD ["bokeh", "serve", "dsi-parser-frontend/", "--port", "5020", "--allow-websocket-origin", "*","--use-xheaders","--prefix","dsi-parser-frontend"]
CMD
["bokeh", "serve", "dsi-parser-frontend/", "--port", "5020", "--allow-websocket-origin", "*","--use-xheaders","--prefix","dsi-parser-frontend"]
This diff is collapsed.
Click to expand it.
startkBokehAndPrintIp.sh
deleted
100755 → 0
+
0
−
39
View file @
752538b0
#!/bin/bash
#!/bin/bash
# Function to print IP addresses using ip command
function
print_ips_with_ip
()
{
echo
"IP addresses on this machine:"
ip
-4
addr show |
grep
-oP
'(?<=inet\s)\d+(\.\d+){3}'
}
# Function to print IP addresses using ifconfig command
function
print_ips_with_ifconfig
()
{
echo
"IP addresses on this machine:"
ifconfig |
grep
-o
'inet addr:\S*'
|
cut
-d
':'
-f2
}
# Check if ip command is available and use it, otherwise try ifconfig
if
command
-v
ip
>
/dev/null 2>&1
;
then
print_ips_with_ip
elif
command
-v
ifconfig
>
/dev/null 2>&1
;
then
print_ips_with_ifconfig
else
echo
"No tool available to find IP addresses."
fi
# Define the initial Bokeh server command
CMD
=(
"bokeh"
"serve"
"dsi-parser-frontend/"
"--port"
"5020"
"--allow-websocket-origin"
"*"
"--use-xheaders"
"--prefix"
"dsi-parser-frontend"
)
# Execute the command
"
${
CMD
[@]
}
"
EXIT_STATUS
=
$?
# Check if the command failed
if
[
$EXIT_STATUS
-ne
0
]
;
then
echo
"Initial Bokeh server command failed. Attempting fallback command..."
# Define and execute the fallback Bokeh server command
CMD
=(
"bokeh"
"serve"
"./"
"--port"
"5020"
"--allow-websocket-origin"
"*"
"--use-xheaders"
"--prefix"
"dsi-parser-frontend"
)
"
${
CMD
[@]
}
"
fi
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment