Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hsh-maxima
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
elc
hsh-maxima
Commits
6077c3c2
Commit
6077c3c2
authored
4 years ago
by
lennart
Browse files
Options
Downloads
Patches
Plain Diff
adjust maximal number of threads 32
also add /goemaxima to paths
parent
b5ca4b0e
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
Dockerfile
+3
-3
3 additions, 3 deletions
Dockerfile
README.md
+6
-0
6 additions, 0 deletions
README.md
src/maxima_fork.c
+3
-1
3 additions, 1 deletion
src/maxima_fork.c
src/web/web.go
+7
-4
7 additions, 4 deletions
src/web/web.go
with
20 additions
and
8 deletions
.gitignore
+
1
−
0
View file @
6077c3c2
...
...
@@ -19,3 +19,4 @@ tags
[._]*.un~
bin
src/web/web
This diff is collapsed.
Click to expand it.
Dockerfile
+
3
−
3
View file @
6077c3c2
...
...
@@ -2,7 +2,7 @@ FROM debian:stable
# e.g. 5.41.0
ARG
MAXIMA_VERSION
# e.g. 2.0.2
2.0.2
# e.g. 2.0.2
ARG
SBCL_VERSION
ENV
SRC=/opt/src \
...
...
@@ -35,7 +35,7 @@ RUN grep stackmaximaversion ${LIB}/stackmaxima.mac | grep -oP "\d+" >> /opt/maxi
&&
cd
${
ASSETS
}
\
&&
maxima
-b
optimize.mac
\
&&
mv
maxima-optimised
${
BIN
}
/maxima-optimised
\
&&
for
i
in
$(
seq
16
)
;
do
\
&&
for
i
in
$(
seq
32
)
;
do
\
useradd
-M
"maxima-
$i
"
;
\
done
...
...
@@ -45,7 +45,7 @@ COPY ./bin/web ${BIN}/goweb
ENV
GOEMAXIMA_LIB_PATH=/opt/maxima/assets/maximalocal.mac
ENV
LANG C.UTF-8
EXPOSE
80
EXPOSE
80
80
# rm /dev/tty because we do not want it to be opened by maxima for security reasons,
# and clear tmp because when kubernetes restarts a pod, it keeps the /tmp content even if it's tmpfs,
...
...
This diff is collapsed.
Click to expand it.
README.md
+
6
−
0
View file @
6077c3c2
...
...
@@ -23,6 +23,12 @@ $ ./buildimage.sh 2020061000
The image should then be available as
`goemaxima:2020061000-dev`
.
Using the Docker Image
======================
The prebuilt docker images are available from the docker hub at
`mathinstitut/goemaxima:[version]-latest`
.
The port of the server in the container is
`8080`
and the path that has to be input into stack is
`http://[address:port]/goemaxima`
.
License
=======
...
...
This diff is collapsed.
Click to expand it.
src/maxima_fork.c
+
3
−
1
View file @
6077c3c2
...
...
@@ -14,7 +14,9 @@
#include
<bsd/unistd.h>
#include
<limits.h>
#include
<grp.h>
#define N_SLOT 16
#ifndef N_SLOT
#define N_SLOT 32
#endif
#define RNOFILE 256
#define FILEPATH_LEN (PATH_MAX + 1)
char
filepath
[
FILEPATH_LEN
];
...
...
This diff is collapsed.
Click to expand it.
src/web/web.go
+
7
−
4
View file @
6077c3c2
...
...
@@ -463,7 +463,7 @@ func main() {
log
.
Fatal
(
"Fatal: wrong cli-argument usage: web [path to maxima executable]"
)
}
// number of maxima users
user_number
,
err
:=
get_env_number_positive
(
"GOEMAXIMA_NUSER"
,
16
)
user_number
,
err
:=
get_env_number_positive
(
"GOEMAXIMA_NUSER"
,
32
)
if
err
!=
nil
{
log
.
Fatal
(
"Fatal: GOEMAXIMA_NUSER contains invalid number"
);
}
...
...
@@ -522,10 +522,13 @@ func main() {
go
generate_maximas
(
os
.
Args
[
1
],
os
.
Getenv
(
"GOEMAXIMA_LIB_PATH"
),
queue
,
user_queue
,
&
metrics
)
http
.
Handle
(
"/metrics"
,
promhttp
.
Handler
())
http
.
HandleFunc
(
"/maxima/"
,
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
handler
:=
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
handler
(
w
,
r
,
queue
,
user_queue
,
&
metrics
)
})
}
http
.
HandleFunc
(
"/maxima"
,
handler
)
http
.
HandleFunc
(
"/maxima/"
,
handler
)
http
.
HandleFunc
(
"/goemaxima"
,
handler
)
http
.
HandleFunc
(
"/goemaxima/"
,
handler
)
log
.
Print
(
"Info: goe handler started"
)
err
=
http
.
ListenAndServe
(
":8080"
,
nil
)
log
.
Printf
(
"Fatal: http handler closed unexpectedly, %s"
,
err
)
...
...
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