Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ediText
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nlpworkers
ediText
Commits
cce6aace
Commit
cce6aace
authored
Mar 11, 2021
by
Mateusz Gniewkowski
Browse files
Options
Downloads
Plain Diff
Merge branch 'Create-dockerfile' into 'master'
Create dockerfile Closes
#1
See merge request
!2
parents
ed71cd97
a3c5c2c1
No related branches found
No related tags found
1 merge request
!2
Create dockerfile
Pipeline
#2676
passed
Mar 11, 2021
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+13
-0
13 additions, 0 deletions
.gitlab-ci.yml
Dockerfile
+25
-0
25 additions, 0 deletions
Dockerfile
ediText.cpp
+10
-0
10 additions, 0 deletions
ediText.cpp
with
48 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
13
−
0
View file @
cce6aace
build_image
:
image
:
docker:18.09.7
only
:
-
master
services
:
-
'
docker:18.09.7-dind'
script
:
-
docker build -t clarinpl/editext .
-
echo $DOCKER_PASSWORD > pass.txt
-
cat pass.txt | docker login --username $DOCKER_USERNAME --password-stdin
-
rm pass.txt
-
docker push clarinpl/editext
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
25
−
0
View file @
cce6aace
FROM
clarinpl/cpp:16.04
RUN
apt-get update
&&
\
apt-get
install
-y
\
cmake g++
\
libboost-all-dev
\
libicu-dev
\
libloki-dev
\
wsnlp
=
1.0.0
\
pwrutils
\
toki
WORKDIR
/home/install
COPY
. editext/
RUN
mkdir
editext/bin
&&
\
cd
editext/bin
&&
\
cmake ..
&&
\
make
-j
&&
\
cd
..
&&
mkdir
/home/worker
&&
mv
bin/ediText /home/worker/ediText
&&
\
cd
/home
&&
rm
-r
/home/install
WORKDIR
/home/worker
COPY
nkjp.ini .
RUN
chmod
+x ./ediText
CMD
["./ediText"]
This diff is collapsed.
Click to expand it.
ediText.cpp
+
10
−
0
View file @
cce6aace
...
...
@@ -21,6 +21,7 @@ public:
void
process
(
string
task_path
,
ptree
&
config
,
string
output_path
);
void
static_init
(
ptree
config
);
void
init
(
ptree
config
);
void
process
(
boost
::
property_tree
::
ptree
&
data
,
boost
::
property_tree
::
ptree
&
options
);
private:
};
...
...
@@ -36,6 +37,10 @@ void ediText_Worker::init(ptree config)
void
ediText_Worker
::
process
(
string
task_path
,
ptree
&
config
,
string
output_path
)
{
if
(
config
.
empty
())
{
throw
std
::
invalid_argument
(
"Unspecified task options"
);
}
std
::
ifstream
input
(
task_path
);
std
::
ofstream
output
(
output_path
);
ConfigParser
conf
(
config
);
...
...
@@ -69,6 +74,11 @@ void ediText_Worker::process(string task_path, ptree &config, string output_path
output
<<
buffer1
.
rdbuf
();
}
void
ediText_Worker
::
process
(
boost
::
property_tree
::
ptree
&
data
,
boost
::
property_tree
::
ptree
&
options
)
{
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
run_workers
<
ediText_Worker
>
(
argc
,
argv
);
...
...
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