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

Commit

Permalink
Merge pull request #347 from bhack/tensorflow_addons
Browse files Browse the repository at this point in the history
Tensorflow addons
  • Loading branch information
Chuxel authored Jun 24, 2020
2 parents 2bd56e9 + 35e900b commit 89baf8c
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
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,50 @@
{
"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"
},

// 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,
"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"
],

// 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"
}

0 comments on commit 89baf8c

Please sign in to comment.