You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM ubuntu:14.04
MAINTAINER YONGI JI <braveji@hanmail.net>
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:bigbio' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
ENTRYPOINT service ssh restart && bash
# Build the gRPC server
bazel build --jobs 2 -c opt //tensorflow/core/distributed_runtime/rpc:grpc_tensorflow_server
# Build and install the pip package
sudo pip install wheel
bazel build --jobs 2 -c opt //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
sudo pip install /tmp/tensorflow_pkg/tensorflow-0.7.1-cp27-none-linux_x86_64.whl
단일컴퓨터에서동작 확인
PC에서 서버를 시작시키고, PC 클라이언트에서 서버를 연결함.
# 서버 실행
cd ~/tensorflow/
bazel-bin/tensorflow/core/distributed_runtime/rpc/grpc_tensorflow_server --cluster_spec='local|localhost:2222' --job_name=local --task_index=0 &
# 클라이언트 실행
cd ~/tensorflow/tensorflow
python
>>> import tensorflow as tf
>>> c = tf.constant ( "Hello, distributed TensorFlow!")
>>> sess = tf.Session ( "grpc://localhost:2222")
>>> sess.run (c)
'Hello, distributed TensorFlow!'