diff --git a/README.md b/README.md index 0d581ae..e9b9e55 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,11 @@ TL;DR: To start the server, run the following: ```bash -$ docker run -d -p 8888:8888 -p 8889:8889 --name crayon alband/crayon +$ docker run -d -p 6006:6006 -p 6007:6007 --name crayon alband/crayon ``` -Tensorboard is now accessible on a browser at `server_machine_address:8888`. The -client should send the data at `server_machine_address:8889`. +Tensorboard is now accessible on a browser at `server_machine_address:6006`. The +client should send the data at `server_machine_address:6007`. ### Client diff --git a/client/lua/README.md b/client/lua/README.md index 71d96c2..c990c7a 100644 --- a/client/lua/README.md +++ b/client/lua/README.md @@ -65,7 +65,7 @@ Run: ```bash # Start new test server -$ docker run -d -p 7998:8888 -p 7999:8889 --name crayon_lua_test alband/crayon +$ docker run -d -p 6006:6006 -p 6007:6007 --name crayon_lua_test alband/crayon # Run test script $ lua(jit) test.lua @@ -82,7 +82,7 @@ local crayon = require("crayon") -- Connect to the server -- substitute localhost and port with the ones you are using -local cc = crayon.CrayonClient("localhost", 8889) +local cc = crayon.CrayonClient("localhost", 6007) -- Create a new experiment local foo = cc:create_experiment("foo") @@ -161,7 +161,7 @@ bar:get_scalar_values("accuracy") ### `CrayonClient` -* Creation: `CrayonClient(hostname="localhost", port=8889)` +* Creation: `CrayonClient(hostname="localhost", port=6007)` * Create a client object and connect it to the server at address `hostname` and port `port`. * `get_experiment_names()` diff --git a/client/lua/crayon.lua b/client/lua/crayon.lua index 97ee7e8..992d143 100644 --- a/client/lua/crayon.lua +++ b/client/lua/crayon.lua @@ -17,7 +17,7 @@ do setmetatable(self, CrayonClient) self.hostname = hostname or "localhost" - self.port = port or 8889 + self.port = port or 6007 self.url = self.hostname .. ":" .. tostring(self.port) -- Add http header if missing diff --git a/client/lua/test.lua b/client/lua/test.lua index 7b7e361..dfaf226 100644 --- a/client/lua/test.lua +++ b/client/lua/test.lua @@ -2,8 +2,8 @@ local crayon = require("crayon") -- A clean server should be running on the test_port with: --- docker run -it -p 7998:8888 -p 7999:8889 --name crayon_lua_test alband/crayon -local test_port = 7999 +-- docker run -it -p 6006:6006 -p 6007:6007 --name crayon_lua_test alband/crayon +local test_port = 6007 local cc = crayon.CrayonClient("localhost", test_port) diff --git a/client/python/README.md b/client/python/README.md index 0fc0a33..e62e76f 100644 --- a/client/python/README.md +++ b/client/python/README.md @@ -67,7 +67,7 @@ bar.get_scalar_values("accuracy") ### `CrayonClient` -* Creation: `CrayonClient(hostname="localhost", port=8889)` +* Creation: `CrayonClient(hostname="localhost", port=6007)` * Create a client object and connect it to the server at address `hostname` and port `port`. * `get_experiment_names()` diff --git a/client/python/pycrayon/crayon.py b/client/python/pycrayon/crayon.py index 396b858..039e271 100644 --- a/client/python/pycrayon/crayon.py +++ b/client/python/pycrayon/crayon.py @@ -19,7 +19,7 @@ class CrayonClient(object): - def __init__(self, hostname="localhost", port=8889): + def __init__(self, hostname="localhost", port=6007): self.hostname = hostname self.port = port self.url = self.hostname + ":" + str(self.port) diff --git a/client/python/test/helper.py b/client/python/test/helper.py index a4cb100..f0364f8 100644 --- a/client/python/test/helper.py +++ b/client/python/test/helper.py @@ -8,7 +8,7 @@ class Helper(object): - def __init__(self, start=True, tb_ip=8888, server_ip=8889, name="crayon"): + def __init__(self, start=True, tb_ip=6006, server_ip=6007, name="crayon"): self.client = docker.from_env() self.tb_ip = tb_ip self.server_ip = server_ip @@ -19,8 +19,8 @@ def __init__(self, start=True, tb_ip=8888, server_ip=8889, name="crayon"): def start(self): self.container = self.client.containers.run( "alband/crayon:latest", - ports={8888: self.tb_ip, - 8889: self.server_ip}, + ports={6006: self.tb_ip, + 6007: self.server_ip}, detach=True, name=self.name) # check server is working diff --git a/server/Dockerfile b/server/Dockerfile index debbc9e..a7df814 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -3,6 +3,6 @@ RUN pip install flask ADD startup.sh / ADD server.py / ADD patch_tensorboard.py / -EXPOSE 8889 +EXPOSE 6007 # TODO: move from cmd to entrypoint -ENTRYPOINT ["/bin/bash", "/startup.sh"] \ No newline at end of file +ENTRYPOINT ["/bin/bash", "/startup.sh"] diff --git a/server/README.md b/server/README.md index fe63de1..d6db5e9 100644 --- a/server/README.md +++ b/server/README.md @@ -11,11 +11,11 @@ docker build -t alband/crayon:latest . Then the server can be started with: ```bash -docker run -d -p 8888:8888 -p 8889:8889 --name crayon alband/crayon [frontend_refresh] [backend_refresh] +docker run -d -p 6006:6006 -p 6007:6007 --name crayon alband/crayon [frontend_refresh] [backend_refresh] ``` 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. 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. -Tensorboard can then be accessed from a browser at `localhost:8888`. -The client should be setup to send the datas at `localhost:8889`. +Tensorboard can then be accessed from a browser at `localhost:6006`. +The client should be setup to send the datas at `localhost:6007`. diff --git a/server/server.py b/server/server.py index ef2bc52..85079b6 100644 --- a/server/server.py +++ b/server/server.py @@ -37,7 +37,7 @@ # Command line arguments import argparse parser = argparse.ArgumentParser(description="Backend server for crayon") -parser.add_argument("port", type=int, default=8889, +parser.add_argument("port", type=int, default=6007, help="Port where to listen for incoming datas") parser.add_argument("backend_reload", type=float, default=1, help="How fast is tensorboard reloading its backend") @@ -145,7 +145,7 @@ def tb_add_histogram(experiment, name, wall_time, step, histo): # Perform requests to tensorboard http api def tb_request(query_type, run=None, tag=None, safe=True): - request_url = "http://localhost:8888/data/{}" + request_url = "http://localhost:6006/data/{}" if run and tag: request_url += "?run={}&tag={}" diff --git a/server/startup.sh b/server/startup.sh index f6a773f..1c91076 100644 --- a/server/startup.sh +++ b/server/startup.sh @@ -21,6 +21,6 @@ if [[ ${RETURN_CODE} != "3" ]] && [[ ${RETURN_CODE} != "2" ]]; then fi echo "Using $CRAYON_BACKEND_RELOAD for backend reload time." -tensorboard --reload_interval $CRAYON_BACKEND_RELOAD --logdir /tmp/tensorboard --port 8888 & +tensorboard --reload_interval $CRAYON_BACKEND_RELOAD --logdir /tmp/tensorboard --port 6006 & -python /server.py 8889 $CRAYON_BACKEND_RELOAD 2>&1 1>/tmp/crayon.log +python /server.py 6007 $CRAYON_BACKEND_RELOAD 2>&1 1>/tmp/crayon.log