Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Sciencebeam Gym
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sciencebeam
Sciencebeam Gym
Commits
db96e9e6
Unverified
Commit
db96e9e6
authored
5 years ago
by
Daniel Ecer
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
added start-autocut.sh script (#115)
parent
35b1470a
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+3
-0
3 additions, 0 deletions
Dockerfile
Makefile
+13
-5
13 additions, 5 deletions
Makefile
scripts/start-app.sh
+33
-0
33 additions, 0 deletions
scripts/start-app.sh
scripts/start-autocut.sh
+7
-0
7 additions, 0 deletions
scripts/start-autocut.sh
with
56 additions
and
5 deletions
Dockerfile
+
3
−
0
View file @
db96e9e6
...
@@ -22,3 +22,6 @@ RUN if [ "${install_dev}" = "y" ]; then pip install -r requirements.dev.txt; fi
...
@@ -22,3 +22,6 @@ RUN if [ "${install_dev}" = "y" ]; then pip install -r requirements.dev.txt; fi
COPY
sciencebeam_gym ${PROJECT_FOLDER}/sciencebeam_gym
COPY
sciencebeam_gym ${PROJECT_FOLDER}/sciencebeam_gym
COPY
*.conf *.sh *.in *.txt *.py ${PROJECT_FOLDER}/
COPY
*.conf *.sh *.in *.txt *.py ${PROJECT_FOLDER}/
COPY
scripts ${PROJECT_FOLDER}/scripts
ENV
PATH ${PROJECT_FOLDER}/scripts:$PATH
This diff is collapsed.
Click to expand it.
Makefile
+
13
−
5
View file @
db96e9e6
...
@@ -41,16 +41,24 @@ pytest-not-slow: build-dev
...
@@ -41,16 +41,24 @@ pytest-not-slow: build-dev
$(
DOCKER_COMPOSE
)
run
--rm
sciencebeam-gym-dev pytest
-m
'not slow'
$(
PYTEST_ARGS
)
$(
DOCKER_COMPOSE
)
run
--rm
sciencebeam-gym-dev pytest
-m
'not slow'
$(
PYTEST_ARGS
)
autocut-start
:
build
.require-AUTOCUT_MODEL_PATH
:
@
if
[
-z
"
$(
AUTOCUT_MODEL_PATH
)
"
]
;
then
\
echo
"AUTOCUT_MODEL_PATH required"
;
\
exit
1
;
\
fi
shell-dev
:
$(
DOCKER_COMPOSE
)
run
--rm
sciencebeam-gym bash
autocut-start
:
.require-AUTOCUT_MODEL_PATH build
$(
DOCKER_COMPOSE
)
run
--rm
\
$(
DOCKER_COMPOSE
)
run
--rm
\
-v
"
$(
AUTOCUT_MODEL_PATH
)
:/tmp/model.pkl"
\
-v
"
$(
AUTOCUT_MODEL_PATH
)
:/tmp/model.pkl"
\
-e
"AUTOCUT_MODEL_PATH=/tmp/model.pkl"
\
-e
"AUTOCUT_MODEL_PATH=/tmp/model.pkl"
\
-p
8080:8080
\
-p
8080:8080
\
sciencebeam-gym
\
sciencebeam-gym
\
gunicorn
\
start-autocut.sh
'sciencebeam_gym.models.text.crf.autocut_app:create_app()'
\
--timeout
10
--log-level
debug
--workers
1
--worker-class
gevent
\
--bind
0.0.0.0:8080
ci-build-and-test
:
ci-build-and-test
:
...
...
This diff is collapsed.
Click to expand it.
scripts/start-app.sh
0 → 100755
+
33
−
0
View file @
db96e9e6
#!/bin/bash
set
-e
GUNICORN_TIMEOUT
=
${
GUNICORN_TIMEOUT
:-
10
}
GUNICORN_LOG_LEVEL
=
${
GUNICORN_LOG_LEVEL
:-
info
}
GUNICORN_WORKERS
=
${
GUNICORN_WORKERS
:-
1
}
GUNICORN_WORKER_CLASS
=
${
GUNICORN_WORKER_CLASS
:-
gevent
}
GUNICORN_HOST
=
${
GUNICORN_HOST
:-
0
.0.0.0
}
GUNICORN_PORT
=
${
GUNICORN_PORT
:-
8080
}
if
[
-z
"
${
APP_NAME
}
"
]
;
then
echo
"APP_NAME required"
exit
1
fi
APP_FACTORY_SUFFIX
=
':create_app()'
CMD
=
"gunicorn
\
"
${
APP_NAME
}${
APP_FACTORY_SUFFIX
}
"
\
--timeout "
${
GUNICORN_TIMEOUT
}
"
\
--log-level "
${
GUNICORN_LOG_LEVEL
}
"
\
--workers "
${
GUNICORN_WORKERS
}
"
\
--worker-class "
${
GUNICORN_WORKER_CLASS
}
"
\
--bind "
${
GUNICORN_HOST
}
:
${
GUNICORN_PORT
}
"
\
$@
"
echo
$CMD
exec
$CMD
This diff is collapsed.
Click to expand it.
scripts/start-autocut.sh
0 → 100755
+
7
−
0
View file @
db96e9e6
#!/bin/bash
set
-e
export
APP_NAME
=
sciencebeam_gym.models.text.crf.autocut_app
exec
"
$(
dirname
$0
)
/start-app.sh"
$@
This diff is collapsed.
Click to expand it.
Preview
0%
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