Practical Tensorflow2 Guide: Setting Up Workspace
2nd Mar 2019
This series is aimed to improve your knowledge in applied machine learning for creating production ready applications using
We are using docker image of tensorflow for quick start. Using an officially supported tensorflow docker image would help us from the troubles of configuring the development machine with all required dependencies.
Even though the majority part of this guide is using jupyter-notebook for writing our scripts/notes, it is very handy to have a code editor installed on your machine for miscellaneous code editing. We will be using VSCode for this series. However, feel free to use the code editor of your choice.
Installation & Workspace Setup
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
dockerfilewith the following content
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.
docker-compose.ymlfile with following content
version: "3.6" services: tensorflow2: volumes: - /blogs/practical-tensorflow-2-setting-up-workspace/:/tf/ ports: - 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.
tensorflow2service by running the following command on terminal
This will start a container with our local folder mapped to the docker image and local port 8888 mapped to container port 8888.
Open a browser and navigate to
Step 5and login
Now our workspace is ready for development.