Skip to content

Instantly share code, notes, and snippets.

@jetsonhacks
Last active June 21, 2020 04:54

Revisions

  1. jetsonhacks revised this gist Jun 21, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Dockerfile.nbody
    Original file line number Diff line number Diff line change
    @@ -39,7 +39,7 @@
    FROM nvcr.io/nvidia/l4t-base:r32.4.2

    RUN apt-get update && apt-get install -y --no-install-recommends make g++
    COPY ./samples /tmp/samples
    RUN cp -r /usr/local/cuda/samples /tmp/samples
    WORKDIR /tmp/samples/5_Simulations/nbody
    RUN make clean && make

  2. jetsonhacks revised this gist Jun 21, 2020. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions Dockerfile.nbody
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,23 @@
    # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    # DEALINGS IN THE SOFTWARE.

    # To enable access to the CUDA compiler (nvcc) during docker build operations, add "default-runtime": "nvidia" to your /etc/docker/daemon.json configuration file before attempting to build the containers:
    # REMEMBER the pound sign is the comment for the Docker file, you will need to remove them for the real json file
    # {
    # "runtimes": {
    # "nvidia": {sudo
    # "path": "nvidia-container-runtime",
    # "runtimeArgs": []
    # }
    # },
    #
    # "default-runtime": "nvidia"
    # }

    # Remember the , after "runtimes" {}
    #You will then want to restart the Docker service or reboot your system before proceeding.
    # $ sudo systemctl restart docker

    # Run the nbody simulation sample
    FROM nvcr.io/nvidia/l4t-base:r32.4.2

  3. jetsonhacks created this gist Jun 20, 2020.
    29 changes: 29 additions & 0 deletions Dockerfile.nbody
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    # Copyright (c) 2020, JetsonHacks. All rights reserved.
    #
    # Permission is hereby granted, free of charge, to any person obtaining a
    # copy of this software and associated documentation files (the "Software"),
    # to deal in the Software without restriction, including without limitation
    # the rights to use, copy, modify, merge, publish, distribute, sublicense,
    # and/or sell copies of the Software, and to permit persons to whom the
    # Software is furnished to do so, subject to the following conditions:
    #
    # The above copyright notice and this permission notice shall be included in
    # all copies or substantial portions of the Software.
    #
    # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    # DEALINGS IN THE SOFTWARE.

    # Run the nbody simulation sample
    FROM nvcr.io/nvidia/l4t-base:r32.4.2

    RUN apt-get update && apt-get install -y --no-install-recommends make g++
    COPY ./samples /tmp/samples
    WORKDIR /tmp/samples/5_Simulations/nbody
    RUN make clean && make

    CMD ["./nbody"]