Practical Tensorflow2 Guide: Setting Up Workspace

2nd Mar 2019

Practical Tensorflow2 Guide: Setting Up Workspace

This series is aimed to improve your knowledge in applied machine learning for creating production ready applications using tensorflow2


Installation & Workspace Setup

  1. Install Docker & VSCode

  2. Let's create a directory for our project. Run the following command in a terminal and it will create folder named practical-tensorflow-2. (or create it manually)

    mkdir practical-tensorflow-2 && cd practical-tensorflow-2
  3. Inside our practical-tensorflow-2 folder, create dockerfile with the following content

    FROM tensorflow/tensorflow:2.0.0a0-py3-jupyter

Note that we are using a custom dockerfile instead of defining image in docker-compose. This is intentional and is for the possibility of additional library installation in future.

  1. Create docker-compose.yml file with following content

    version: "3.6"
                - /blogs/practical-tensorflow-2-setting-up-workspace/:/tf/
                - 8888:8888

    This will map our local working folder to docker image volume. So we can keep our project files in our development space and still run our notebooks using docker.

  2. Start our tensorflow2 service by running the following command on terminal

    docker-compose up

    This will start a container with our local folder mapped to the docker image and local port 8888 mapped to container port 8888.


  3. Open a browser and navigate to http://localhost:8888 or

  4. Copy the token value from Step 5 and login


Now our workspace is ready for development.