Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
91272139
Commit
91272139
authored
Aug 03, 2017
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'testing-merge' into stable-imt-merge
parents
8f9ce692
84482223
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
48 additions
and
32 deletions
+48
-32
nodes.py
gargantext/models/nodes.py
+2
-1
db.py
gargantext/util/db.py
+4
-1
gargantext_notebook.py
gargantext_notebook.py
+1
-0
docker.install
install/docker.install
+1
-0
requirements.txt
install/gargamelle/requirements.txt
+1
-1
notebook.run
install/notebook.run
+11
-3
Dockerfile
install/notebook/Dockerfile
+23
-23
gargantext_notebook.py
install/notebook/gargantext_notebook.py
+2
-2
requirements.txt
install/notebook/requirements.txt
+3
-1
No files found.
gargantext/models/nodes.py
View file @
91272139
...
@@ -2,7 +2,8 @@ from gargantext.util.db import session
...
@@ -2,7 +2,8 @@ from gargantext.util.db import session
from
gargantext.util.files
import
upload
from
gargantext.util.files
import
upload
from
gargantext.constants
import
*
from
gargantext.constants
import
*
from
sqlalchemy_utils.types
import
TSVectorType
# Uncomment to make column full text searchable
#from sqlalchemy_utils.types import TSVectorType
from
datetime
import
datetime
from
datetime
import
datetime
...
...
gargantext/util/db.py
View file @
91272139
...
@@ -9,7 +9,10 @@ import sqlalchemy as sa
...
@@ -9,7 +9,10 @@ import sqlalchemy as sa
from
sqlalchemy.orm
import
sessionmaker
,
scoped_session
from
sqlalchemy.orm
import
sessionmaker
,
scoped_session
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy
import
delete
from
sqlalchemy
import
delete
from
sqlalchemy_searchable
import
make_searchable
# To make Full Text search possible, uncomment lines below
# (and install it with pip before)
#from sqlalchemy_searchable import make_searchable
def
get_engine
():
def
get_engine
():
from
sqlalchemy
import
create_engine
from
sqlalchemy
import
create_engine
...
...
gargantext_notebook.py
0 → 120000
View file @
91272139
install
/
notebook
/
gargantext_notebook
.
py
\ No newline at end of file
install/docker.install
View file @
91272139
...
@@ -17,5 +17,6 @@ sudo add-apt-repository \
...
@@ -17,5 +17,6 @@ sudo add-apt-repository \
$(lsb_release -cs) \
$(lsb_release -cs) \
stable"
stable"
sudo
apt
-
get
update
sudo
apt
-
get
install
docker
-
ce
sudo
apt
-
get
install
docker
-
ce
sudo
docker
run
hello
-
world
sudo
docker
run
hello
-
world
install/gargamelle/requirements.txt
View file @
91272139
...
@@ -17,7 +17,7 @@ jdatetime==1.7.2
...
@@ -17,7 +17,7 @@ jdatetime==1.7.2
kombu==3.0.37 # messaging
kombu==3.0.37 # messaging
langdetect==1.0.6 #detectinglanguage
langdetect==1.0.6 #detectinglanguage
nltk==3.1
nltk==3.1
numpy==1.1
0.4
numpy==1.1
3.1
psycopg2==2.6.2
psycopg2==2.6.2
pycountry==1.20
pycountry==1.20
python-dateutil==2.4.2
python-dateutil==2.4.2
...
...
install/notebook.run
View file @
91272139
...
@@ -4,12 +4,20 @@
...
@@ -4,12 +4,20 @@
#-v /srv/gargantext_lib:/srv/gargantext_lib \
#-v /srv/gargantext_lib:/srv/gargantext_lib \
sudo
docker
rm
$(
sudo
docker ps
-a
|
grep
notebook |
grep
sh |
awk
'{print $1}'
)
sudo
docker
rm
$(
sudo
docker ps
-a
|
grep
notebook |
grep
sh |
awk
'{print $1}'
)
#HOSTIP=$(ip route show 0.0.0.0/0 | awk '{print $3}')
#--add-host=localhost:${HOSTIP} \
sudo
docker run
\
sudo
docker run
\
--name
=
garg-notebook
\
--name
=
garg-notebook
\
-
v
/srv/gargantext:/srv/gargantex
t
\
-
-net
=
hos
t
\
-p
8899:8899
\
-p
8899:8899
\
--env
POSTGRES_HOST
=
localhost
\
-v
/srv/gargantext:/srv/gargantext
\
-it
garg-notebook:latest
\
-it
garg-notebook:latest
\
/bin/bash
-c
"/bin/su notebooks -c 'source /env_3-5/bin/activate && jupyter notebook --port=8899 --ip=0.0.0.0 --no-browser --notebook-dir=/home/notebooks/'"
/bin/bash
-c
"/bin/su notebooks -c 'source /env_3-5/bin/activate && cd /srv/gargantext/ && jupyter notebook --port=8899 --ip=0.0.0.0 --no-browser'"
#/bin/bash -c "/bin/su gargantua -c 'source /env_3-5/bin/activate && jupyter notebook --port=8899 --ip=127.0.0.1 --no-browser'"
# #&& jupyter nbextension enable --py widgetsnbextension --sys-prefix
#/bin/bash -c "/bin/su notebooks -c 'source /env_3-5/bin/activate && cd /srv/gargantext/ && jupyter notebook --port=8899 --ip=0.0.0.0 --no-browser --notebook-dir=/home/notebooks/'"
install/notebook/Dockerfile
View file @
91272139
...
@@ -16,10 +16,10 @@ RUN apt-get update && \
...
@@ -16,10 +16,10 @@ RUN apt-get update && \
apt-utils ca-certificates locales
\
apt-utils ca-certificates locales
\
sudo
aptitude gcc g++ wget git vim
\
sudo
aptitude gcc g++ wget git vim
\
build-essential make
\
build-essential make
\
curl
\
curl
postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6
\
#
postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6 \
postgresql-server-dev-9.6 libpq-dev libxml2
\
#
postgresql-server-dev-9.6 libpq-dev libxml2 \
postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6
#
postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6
# Install Stack
# Install Stack
...
@@ -69,7 +69,7 @@ RUN virtualenv /env_3-5
...
@@ -69,7 +69,7 @@ RUN virtualenv /env_3-5
RUN
echo
'alias venv="source /env_3-5/bin/activate"'
>>
~/.bashrc
RUN
echo
'alias venv="source /env_3-5/bin/activate"'
>>
~/.bashrc
# CONFIG FILES
# CONFIG FILES
ADD
requirements.txt /
ADD
requirements.txt /
ADD
psql_configure.sh /
#
ADD psql_configure.sh /
ADD
django_configure.sh /
ADD
django_configure.sh /
RUN
.
/env_3-5/bin/activate
&&
pip3
install
-r
requirements.txt
&&
\
RUN
.
/env_3-5/bin/activate
&&
pip3
install
-r
requirements.txt
&&
\
...
@@ -85,23 +85,23 @@ RUN chown notebooks:notebooks -R /env_3-5
...
@@ -85,23 +85,23 @@ RUN chown notebooks:notebooks -R /env_3-5
### Notebook IHaskell and IPYTHON ENVIRONNEMENT
### Notebook IHaskell and IPYTHON ENVIRONNEMENT
########################################################################
########################################################################
RUN
apt-get update
&&
apt-get
install
-y
\
#
RUN apt-get update && apt-get install -y \
libtinfo-dev
\
#
libtinfo-dev \
libzmq3-dev
\
#
libzmq3-dev \
libcairo2-dev
\
#
libcairo2-dev \
libpango1.0-dev
\
#
libpango1.0-dev \
libmagic-dev
\
#
libmagic-dev \
libblas-dev
\
#
libblas-dev \
liblapack-dev
#
liblapack-dev
RUN
curl
-sSL
https://get.haskellstack.org/ | sh
#
RUN curl -sSL https://get.haskellstack.org/ | sh
RUN
stack setup
#
RUN stack setup
RUN
git clone https://github.com/gibiansky/IHaskell
#
RUN git clone https://github.com/gibiansky/IHaskell
RUN
.
/env_3-5/bin/activate
\
#
RUN . /env_3-5/bin/activate \
&&
cd
IHaskell
\
#
&& cd IHaskell \
&&
stack
install
gtk2hs-buildtools
\
#
&& stack install gtk2hs-buildtools \
&&
stack
install
--fast
\
#
&& stack install --fast \
&&
/root/.local/bin/ihaskell
install
--stack
#
&& /root/.local/bin/ihaskell install --stack
#
#
#
########################################################################
########################################################################
...
@@ -112,6 +112,6 @@ RUN . /env_3-5/bin/activate \
...
@@ -112,6 +112,6 @@ RUN . /env_3-5/bin/activate \
#RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.5/main/pg_hba.conf
#RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.5/main/pg_hba.conf
#RUN echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf
#RUN echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf
EXPOSE
8899
EXPOSE
5432
8899
VOLUME
["/srv/","/home/notebooks/"]
VOLUME
["/srv/","/home/notebooks/"]
install/notebook/gargantext_notebook.py
View file @
91272139
"""
"""
Gargantext Software Copyright (c) 2016 CNRS ISC-PIF -
Gargantext Software Copyright (c) 2016
-2017
CNRS ISC-PIF -
http://iscpif.fr
http://iscpif.fr
Licence (see :
Licence (see :
http://gitlab.iscpif.fr/humanities/gargantext/blob/stable/LICENSE )
http://gitlab.iscpif.fr/humanities/gargantext/blob/stable/LICENSE )
...
@@ -47,7 +47,7 @@ def documents(corpus_id):
...
@@ -47,7 +47,7 @@ def documents(corpus_id):
)
)
import
seaborn
as
sns
#
import seaborn as sns
import
pandas
as
pd
import
pandas
as
pd
def
chart
(
docs
,
field
):
def
chart
(
docs
,
field
):
...
...
install/notebook/requirements.txt
View file @
91272139
...
@@ -17,7 +17,7 @@ jdatetime==1.7.2
...
@@ -17,7 +17,7 @@ jdatetime==1.7.2
kombu==3.0.37 # messaging
kombu==3.0.37 # messaging
langdetect==1.0.6 #detectinglanguage
langdetect==1.0.6 #detectinglanguage
nltk==3.1
nltk==3.1
numpy==1.1
0.4
numpy==1.1
3.1
psycopg2==2.6.2
psycopg2==2.6.2
pycountry==1.20
pycountry==1.20
python-dateutil==2.4.2
python-dateutil==2.4.2
...
@@ -40,3 +40,5 @@ jupyter-console==5.1.0
...
@@ -40,3 +40,5 @@ jupyter-console==5.1.0
jupyter-core==4.3.0
jupyter-core==4.3.0
ipython==5.2.0
ipython==5.2.0
ipython-genutils==0.1.0
ipython-genutils==0.1.0
ipywidgets
matplotlib==2.0.2
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