Skip to content

Make the developer's experience better on Windows #1134

Closed
@gabrieldemarmiesse

Description

@gabrieldemarmiesse

Describe the feature and the current behavior/state.

Currently, the developement on windows is quite painful. There is no guide or explanations on how to install the tools and start contributing. But there are many many windows devs out there, who would surely like to contribute to tf.addons but can't get the setup right. We might even have someone who will make the custom ops work on windows with a GPU.

I'm on Windows so I know the few issues that contributing causes but I cheat when working (I use WSL2).

We need a guide explaining the 3 options that windows devs can use without spending days getting the setup right:

  1. Use WSL2: It's the easiest option. You're in linux, so you can forget everything you know about Windows, start installing docker CE, python, bazel and start contributing.
    -> can run all linux tests, + pre-commit + sanity check, no windows tests
    Setup time: 20m to install WSL2, 30m to install docker, python and bazel

  2. Use Docker desktop for Windows with linux and windows containers:
    -> can run all linux tests, + pre-commit + sanity check + windows tests but we need to make a windows dockerfile.
    Setup time: 20min to install Docker desktop

  3. Use Docker desktop + native install:
    -> can run everything and even try to test custop ops on windows with gpu.
    Setup time: Infinity

To help with 2), I started making a Windows dockerfile, it's nearly finished, someone just need to find the right BAZEL_VC path:

FROM mcr.microsoft.com/windows/servercore:1909

ENV chocolateyUseWindowsCompression false

RUN powershell -Command \
        iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \
        choco feature disable --name showDownloadProgress

RUN choco feature enable -n allowGlobalConfirmation
RUN choco install python --version=3.5.4
RUN choco install bazel --version=1.1.0

# Needed by bazel
RUN choco install vcredist2015

RUN choco install git -params '"/GitAndUnixToolsOnPath"'
RUN pip install wheel setuptools tensorflow-cpu==2.1.0 typeguard

RUN choco install microsoft-build-tools --version=14.0.25420.1
ENV BAZEL_VC ??????????????????
COPY ./ /addons
WORKDIR /addons
RUN bash.exe ./tools/ci_testing/addons_cpu.sh --no-deps

See here for how we run tests in the windows virtual machine in github actions.

Relevant information

  • Are you willing to contribute it (yes/no): Maybe
  • Are you willing to maintain it going forward? (yes/no): Maybe
  • Is there a relevant academic paper? (if so, where): No
  • Is there already an implementation in another framework? (if so, where): no
  • Was it part of tf.contrib? (if so, where): no

Which API type would this fall under (layer, metric, optimizer, etc.)

All

Who will benefit with this feature?

All users who use windows and want to contribute

Any other info.

I've spent too much time on the Dockerfile, if someone wants to continue and finalize the contributing guide, it would be really nice.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions