Docker learning and dev environment

(Frederick Kautz) #1

I’ve added a Dockerfile and submitted it in patch #11

It is paired up with a Makefile.

A few notes:

  • The image requires additional capabilities due to swift and lldb.
  • The image was not tested with reduced capabilities when using swift-jupyter. Maybe we can sacrifice swift cli repl for better security.
  • A makefile was included to help build and start the swiftai environment.
  • For now, this image uses the CPU images because GPU on docker requires the installation of docker-nvidia. I’m developing on an OSX laptop which has an AMD GPU, so… :stuck_out_tongue:. It would be good to get someone to contribute in this space since there is significant benefit. I personally will probably just skip directly to kubernetes w/GPU support since I have access to that, but that likely won’t help most users getting started.
# Default target builds docker image
make

# Start jupyter with S4TF support
make jupyter

# Start a shell
make shell

You’ll see something like this:

    To access the notebook, open this file in a browser:
        file:///root/.local/share/jupyter/runtime/nbserver-7-open.html
    Or copy and paste one of these URLs:
        http://cddd24d4ed29:8888/?token=[TOKEN_ID]
     or http://127.0.0.1:8888/?token=[TOKEN_ID]

Copy and paste the 127.0.0.1 (IPv4) version to your browser and have fun!

0 Likes