Skip to content

Commit e739ab1

Browse files
committed
[New] fix bootup steps.
1 parent 7eef03b commit e739ab1

File tree

7 files changed

+37
-196
lines changed

7 files changed

+37
-196
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
sftp-config.json
2-
2+
files/supervisor/17live_comments.conf
3+
NVIDIA*

Diff for: 2-start-mldm.sh

+2-10
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,9 @@ mkdir -p $HOME/workspace/notebooks
88
nvidia-docker run -d \
99
--name=mldm_gpu \
1010
-v $HOME/workspace:/home/workspace \
11-
-p 8880-8899:8880-8899 \
12-
-it marsan/mldm_gpu ipynb
11+
-p 8880-8900:8880-8900 -p 80:80 -p 443:443 \
12+
-it marsan/mldm_gpu
1313

14-
# --device /dev/nvidia0:/dev/nvidia0 \
15-
# --device /dev/nvidia1:/dev/nvidia1 \
16-
# --device /dev/nvidia2:/dev/nvidia2 \
17-
# --device /dev/nvidia3:/dev/nvidia3 \
18-
# --device /dev/nvidiactl:/dev/nvidiactl \
19-
# --device /dev/nvidia-uvm:/dev/nvidia-uvm \
20-
21-
2214
## -h mldm_env \
2315
## -p 6800-6810:6800-6810 \
2416
##docker run -it kaggle/python bash

Diff for: Dockerfile

+23-23
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,24 @@ RUN pip install -U \
100100
cherrypy \
101101
jieba3k \
102102
yolk3k \
103-
azure \
103+
azure
104+
105+
RUN pip install \
104106
cython \
105-
html5lib \
107+
html5lib
108+
109+
RUN pip install \
106110
pyyaml \
107111
demjson \
108-
hanziconv \
112+
hanziconv
113+
114+
RUN pip install \
109115
ftfy \
110116
hiredis \
111-
google-api-python-client
117+
google-api-python-client \
118+
regex
112119

113-
RUN pip install -U \
120+
RUN pip install \
114121
Django \
115122
django-pipeline \
116123
django-bootstrap3 \
@@ -125,9 +132,9 @@ RUN pip install \
125132
django-dashing
126133

127134

128-
# MySQL
129-
RUN apt-get install -y python3-dev libmysqlclient-dev
130-
RUN pip install mysqlclient
135+
## MySQL
136+
#RUN apt-get install -y python3-dev libmysqlclient-dev
137+
#RUN pip install mysqlclient
131138

132139

133140
# pathos (python parallel process)
@@ -137,7 +144,7 @@ RUN pip install mysqlclient
137144
# newspaper3k
138145

139146
# Tensorflow GPU supported version
140-
RUN pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp35-cp35m-linux_x86_64.whl
147+
RUN pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0rc0-cp35-cp35m-linux_x86_64.whl
141148

142149

143150
#---------------------------------
@@ -165,13 +172,6 @@ RUN apt-get update | apt-get upgrade -y
165172
RUN apt-get install libpam-cracklib -y
166173
RUN ln -s /lib/x86_64-linux-gnu/security/pam_cracklib.so /lib/security
167174

168-
# Define working directory.
169-
WORKDIR /etc/supervisor/conf.d
170-
171-
# ------------------------------------------------------------------------------
172-
# Start supervisor, define default command.
173-
# CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
174-
175175

176176

177177
#---------------------------------
@@ -181,18 +181,18 @@ WORKDIR /etc/supervisor/conf.d
181181
RUN echo "Asia/Taipei" > /etc/timezone
182182
RUN dpkg-reconfigure -f noninteractive tzdata
183183

184-
# Add runner script
185-
COPY files/runner.sh /runner.sh
186-
RUN chmod +x /runner.sh
187-
WORKDIR /root
184+
# conventions
188185
COPY files/bashrc .bashrc
189186
COPY files/vimrc .vimrc
190187

188+
# setup supervisor apps & start supervisor
189+
COPY files/supervisor/* /etc/supervisor/conf.d/
190+
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
191+
191192
## Set the working directory
192193
WORKDIR /home/workspace
193-
#RUN mkdir /home/workspace/notebooks
194-
#VOLUME /Users/marsan/wordspace
195194

196195
EXPOSE 8880:8900
196+
EXPOSE 80
197+
EXPOSE 443
197198

198-
ENTRYPOINT ["/runner.sh"]

Diff for: files/bashrc

+3
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ alias python='python3'
101101
alias shup='stdbuf -o0 nohup'
102102
alias kget='wget -x --load-cookies ~/.ssh/cookies.txt -P data -nH --cut-dirs=5 '
103103
alias wat='watch tail -n 30 '
104+
bkill() {
105+
sudo kill -9 `ps aux | grep "$1" | awk '{print $2}'`
106+
}
104107

105108
# Add an "alert" alias for long running commands. Use like so:
106109
# sleep 10; alert

Diff for: files/runner.sh

-21
This file was deleted.

Diff for: files/supervisor/notebooks.conf

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[program:notebooks]
2+
command=ipython3 notebook --no-browser --ip='*' --matplotlib="inline"
3+
startsecs=0
4+
redirect_stderr=true
5+
directory=/home/workspace/notebooks
6+
stdout_logfile=/home/workspace/notebooks/notebook_mon.log
7+
stdout_logfile_maxbytes=100MB

Diff for: files/supervisord.conf

-141
This file was deleted.

0 commit comments

Comments
 (0)