Skip to content

Commit

Permalink
Workable version
Browse files Browse the repository at this point in the history
  • Loading branch information
yi.wu committed May 1, 2017
1 parent c6d4336 commit 6a8bd2e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,35 @@

## Getting Started

Make sure you have `Python > 2.7.10` installed.
### Pre-Requirements
- PaddlePaddle Cloud needs python to support `OPENSSL 1.2`. To check it out, simply run:
```python
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.2k 26 Jan 2017'
```
- Make sure you have `Python > 2.7.10` installed.

### Run on kubernetes
```bash
# build docker image
git clone https://github.com/PaddlePaddle/cloud.git
cd cloud/paddlecloud
docker build -t [your_docker_registry]/pcloud .
docker push [your_docker_registry]/pcloud
# submit to kubernetes
kubectl create -f ./k8s
```

To test or visit the web site, find out the kubernetes [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) ip addresses, and bind it to your `/etc/hosts` file:
```
# your ingress ip address
192.168.1.100 cloud.paddlepaddle.org
```

Then open your browser and visit http://cloud.paddlepaddle.org.

### Run locally
Make sure you are using a virtual environment of some sort (e.g. `virtualenv` or
`pyenv`).
```
Expand All @@ -27,3 +54,4 @@ If you are starting the server for the second time, just run:
```
./manage.py runserver
```

2 changes: 1 addition & 1 deletion paddlecloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:2.7.13-alpine
RUN apk add --update -y nodejs
RUN apk add --update nodejs openssl

ADD requirements.txt package.json /pcloud/
RUN cd /pcloud && npm install && pip install -r requirements.txt && npm build
Expand Down
1 change: 1 addition & 0 deletions paddlecloud/k8s/cloud_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
path: "/Users/wuyi/go/src/github.com/typhoonzero/PaddleCloud/paddlecloud"
containers:
- name: paddle-cloud
imagePullPolicy: Always
volumeMounts:
- mountPath: /pcloud
name: pcloud-volume
Expand Down
1 change: 1 addition & 0 deletions paddlecloud/paddlecloud/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

ALLOWED_HOSTS = [
"127.0.0.1",
"cloud.paddlepaddle.org",
]

# Local time zone for this installation. Choices can be found here:
Expand Down

0 comments on commit 6a8bd2e

Please sign in to comment.