Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Commit de69ef1

Browse files
author
Romain Bossart
committed
[fix] update ports (8888,8889) -> (6006,6007)
1 parent 3e39fa7 commit de69ef1

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ TL;DR:
4848
To start the server, run the following:
4949

5050
```bash
51-
$ docker run -d -p 8888:8888 -p 8889:8889 --name crayon alband/crayon
51+
$ docker run -d -p 6006:6006 -p 6007:6007 --name crayon alband/crayon
5252
```
5353

54-
Tensorboard is now accessible on a browser at `server_machine_address:8888`. The
55-
client should send the data at `server_machine_address:8889`.
54+
Tensorboard is now accessible on a browser at `server_machine_address:6006`. The
55+
client should send the data at `server_machine_address:6007`.
5656

5757
### Client
5858

client/lua/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Run:
6565

6666
```bash
6767
# Start new test server
68-
$ docker run -d -p 7998:8888 -p 7999:8889 --name crayon_lua_test alband/crayon
68+
$ docker run -d -p 6006:6006 -p 6007:6007 --name crayon_lua_test alband/crayon
6969

7070
# Run test script
7171
$ lua(jit) test.lua
@@ -82,7 +82,7 @@ local crayon = require("crayon")
8282

8383
-- Connect to the server
8484
-- substitute localhost and port with the ones you are using
85-
local cc = crayon.CrayonClient("localhost", 8889)
85+
local cc = crayon.CrayonClient("localhost", 6007)
8686

8787
-- Create a new experiment
8888
local foo = cc:create_experiment("foo")
@@ -161,7 +161,7 @@ bar:get_scalar_values("accuracy")
161161

162162
### `CrayonClient`
163163

164-
* Creation: `CrayonClient(hostname="localhost", port=8889)`
164+
* Creation: `CrayonClient(hostname="localhost", port=6007)`
165165
* Create a client object and connect it to the server at address `hostname` and port `port`.
166166

167167
* `get_experiment_names()`

client/lua/crayon.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ do
1717
setmetatable(self, CrayonClient)
1818

1919
self.hostname = hostname or "localhost"
20-
self.port = port or 8889
20+
self.port = port or 6007
2121
self.url = self.hostname .. ":" .. tostring(self.port)
2222

2323
-- Add http header if missing

client/lua/test.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ local crayon = require("crayon")
22

33

44
-- A clean server should be running on the test_port with:
5-
-- docker run -it -p 7998:8888 -p 7999:8889 --name crayon_lua_test alband/crayon
6-
local test_port = 7999
5+
-- docker run -it -p 6006:6006 -p 6007:6007 --name crayon_lua_test alband/crayon
6+
local test_port = 6007
77

88
local cc = crayon.CrayonClient("localhost", test_port)
99

client/python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ bar.get_scalar_values("accuracy")
6767

6868
### `CrayonClient`
6969

70-
* Creation: `CrayonClient(hostname="localhost", port=8889)`
70+
* Creation: `CrayonClient(hostname="localhost", port=6007)`
7171
* Create a client object and connect it to the server at address `hostname` and port `port`.
7272

7373
* `get_experiment_names()`

client/python/pycrayon/crayon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
class CrayonClient(object):
22-
def __init__(self, hostname="localhost", port=8889):
22+
def __init__(self, hostname="localhost", port=6007):
2323
self.hostname = hostname
2424
self.port = port
2525
self.url = self.hostname + ":" + str(self.port)

client/python/test/helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class Helper(object):
1010

11-
def __init__(self, start=True, tb_ip=8888, server_ip=8889, name="crayon"):
11+
def __init__(self, start=True, tb_ip=6006, server_ip=6007, name="crayon"):
1212
self.client = docker.from_env()
1313
self.tb_ip = tb_ip
1414
self.server_ip = server_ip
@@ -19,8 +19,8 @@ def __init__(self, start=True, tb_ip=8888, server_ip=8889, name="crayon"):
1919
def start(self):
2020
self.container = self.client.containers.run(
2121
"alband/crayon:latest",
22-
ports={8888: self.tb_ip,
23-
8889: self.server_ip},
22+
ports={6006: self.tb_ip,
23+
6007: self.server_ip},
2424
detach=True,
2525
name=self.name)
2626
# check server is working

server/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ RUN pip install flask
33
ADD startup.sh /
44
ADD server.py /
55
ADD patch_tensorboard.py /
6-
EXPOSE 8889
6+
EXPOSE 6007
77
# TODO: move from cmd to entrypoint
8-
ENTRYPOINT ["/bin/bash", "/startup.sh"]
8+
ENTRYPOINT ["/bin/bash", "/startup.sh"]

server/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ docker build -t alband/crayon:latest .
1111

1212
Then the server can be started with:
1313
```bash
14-
docker run -d -p 8888:8888 -p 8889:8889 --name crayon alband/crayon [frontend_refresh] [backend_refresh]
14+
docker run -d -p 6006:6006 -p 6007:6007 --name crayon alband/crayon [frontend_refresh] [backend_refresh]
1515
```
1616
Where `frontend_refresh` is an optional argument that allows to change the refresh rate of tensorboard to the given value (in seconds). Default is 10 seconds.
1717
Where `backend_refresh` in an optional argument that allows to change how often the tensorflow backend reload the files from disk (in seconds). Default is 0.5 seconds. Reducing this value too much may make tensorboard unstable.
1818

1919

20-
Tensorboard can then be accessed from a browser at `localhost:8888`.
21-
The client should be setup to send the datas at `localhost:8889`.
20+
Tensorboard can then be accessed from a browser at `localhost:6006`.
21+
The client should be setup to send the datas at `localhost:6007`.

server/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# Command line arguments
3838
import argparse
3939
parser = argparse.ArgumentParser(description="Backend server for crayon")
40-
parser.add_argument("port", type=int, default=8889,
40+
parser.add_argument("port", type=int, default=6007,
4141
help="Port where to listen for incoming datas")
4242
parser.add_argument("backend_reload", type=float, default=1,
4343
help="How fast is tensorboard reloading its backend")
@@ -145,7 +145,7 @@ def tb_add_histogram(experiment, name, wall_time, step, histo):
145145

146146
# Perform requests to tensorboard http api
147147
def tb_request(query_type, run=None, tag=None, safe=True):
148-
request_url = "http://localhost:8888/data/{}"
148+
request_url = "http://localhost:6006/data/{}"
149149
if run and tag:
150150
request_url += "?run={}&tag={}"
151151

0 commit comments

Comments
 (0)