Commit 31ca0b75 authored by Daniele Venzano's avatar Daniele Venzano

Handle logs containing utf-8 characters

parent 9ebfcd34
# Jupyter Notebook with PyTorch
URL: [https://hub.docker.com/r/jupyter/scipy-notebook/](https://hub.docker.com/r/jupyter/scipy-notebook/) and [http://pytorch.org/](http://pytorch.org/)
* Jupyter Notebook 5.0.x
* Conda Python 3.x environment
* pandas, matplotlib, scipy, seaborn, scikit-learn, scikit-image, sympy, cython, patsy, statsmodel, cloudpickle, dill, numba, bokeh, vincent, beautifulsoup, xlrd pre-installed
* PyTorch
Please note that you need to retrieve the secret key from the service logs to be able to access the notebooks.
{
"name": "pytorch-notebook",
"services": [
{
"command": null,
"environment": [
[
"NB_UID",
"1000"
],
[
"HOME",
"/mnt/workspace"
]
],
"essential_count": 1,
"image": "zapps/pytorch:4761",
"monitor": true,
"name": "jupyter",
"ports": [
{
"name": "Jupyter Notebook interface",
"port_number": 8888,
"protocol": "tcp",
"url_template": "http://{ip_port}/"
}
],
"replicas": 1,
"resources": {
"cores": {
"max": 4,
"min": 4
},
"memory": {
"max": 4294967296,
"min": 4294967296
}
},
"startup_order": 0,
"total_count": 1,
"volumes": [],
"work_dir": "/mnt/workspace"
}
],
"size": 512,
"version": 3,
"will_end": false
}
\ No newline at end of file
{
"name": "tf-google-gpu",
"services": [
{
"command": null,
"environment": [
[
"NVIDIA_VISIBLE_DEVICES",
"all"
]
],
"essential_count": 1,
"image": "gcr.io/tensorflow/tensorflow:1.3.0-gpu-py3",
"labels": [
"gpu"
],
"monitor": true,
"name": "tf-jupyter",
"ports": [
{
"name": "Tensorboard web interface",
"port_number": 6006,
"protocol": "tcp",
"url_template": "http://{ip_port}/"
},
{
"name": "Notebook web interface",
"port_number": 8888,
"protocol": "tcp",
"url_template": "http://{ip_port}/"
}
],
"replicas": 1,
"resources": {
"cores": {
"max": 4,
"min": 4
},
"memory": {
"max": 34359738368,
"min": 34359738368
}
},
"startup_order": 0,
"total_count": 1,
"volumes": []
}
],
"size": 512,
"version": 3,
"will_end": false
}
\ No newline at end of file
......@@ -56,7 +56,7 @@ class GELFUDPHandler(socketserver.DatagramRequestHandler):
open(log_file_path, 'w').write('ZOE HEADER: log file for service {} running on host {}\n'.format(service_name, host))
with open(log_file_path, 'a') as logfile:
logfile.write(timestamp + ' ' + message + '\n')
logfile.write(timestamp + ' ' + message.encode('utf-8') + '\n')
class ZoeLoggerUDPServer(socketserver.UDPServer):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment