Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Tensorflow addons #347

Merged
merged 23 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

ARG IMAGE_TYPE=latest-cpu
FROM tfaddons/dev_container:$IMAGE_TYPE

# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Options for common package install script - SHA updated on release
ARG INSTALL_ZSH="false"
ARG UPGRADE_PACKAGES="false"
ARG COMMON_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/script-library/common-debian.sh"
ARG COMMON_SCRIPT_SHA="dev-mode"

# Configure apt and install packages
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
#
# Verify git, common tools / libs installed, add/modify non-root user, optionally install zsh
&& apt-get -y install --no-install-recommends curl ca-certificates 2>&1 \
&& curl -sSL ${COMMON_SCRIPT_SOURCE} -o /tmp/common-setup.sh \
&& ([ "${COMMON_SCRIPT_SHA}" = "dev-mode" ] || (echo "${COMMON_SCRIPT_SHA} */tmp/common-setup.sh" | sha256sum -c -)) \
&& /bin/bash /tmp/common-setup.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \
&& rm /tmp/common-setup.sh \
#
# *********************************************************************
# * Uncomment this section to use RUN to install other dependencies. *
# * See https://aka.ms/vscode-remote/containers/dockerfile-run *
# *********************************************************************
# && apt-get -y install --no-install-recommends <your-package-list-here>
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "Tensorflow Addons SIG Dev Container",

// Uncomment this for GPU images
// "build": {
// "args": {
// "IMAGE_TYPE": "latest"
// }
//},

"dockerFile": "Dockerfile",

"remoteEnv": {
TF_CPP_MIN_LOG_LEVEL": "1"
bhack marked this conversation as resolved.
Show resolved Hide resolved
},

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": null,
"python.formatting.provider": "black",
"python.linting.flake8Enabled": true,
"python.testing.pytestEnabled": true,
bhack marked this conversation as resolved.
Show resolved Hide resolved
"python.testing.pytestArgs": ["./tensorflow_addons"],
"C_Cpp.clang_format_style": "{BasedOnStyle: Google}",
"C_Cpp.default.includePath": [
"${workspaceFolder}/**",
"/usr/local/lib/python3.6/dist-packages/tensorflow/include/"
],
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
// Before you enable bazel integration check https://github.com/bazelbuild/bazel/issues/10226
//"BazelBuild.vscode-bazel",
"ms-python.python",
"ms-vscode.cpptools"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Uncomment to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-in-docker.
bhack marked this conversation as resolved.
Show resolved Hide resolved
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
"runArgs": [
// Uncomment to enable Nvidia support for GPU images
// "--runtime=nvidia"],
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}