yoshitomo-matsubara/torchdistill

About dockerfile of torchdistill

lliai opened this issue · 1 comments

lliai commented

I think your open source project (torchdistill) is so great ! But I meet a little problems when I try to run it on my cloud server . Would you provide the dockerfile of this project, just like the following project (https://github.com/mzhaoshuai/SplitNet-Divide-and-Co-training). Thanks so much !

Hi @lilujunai ,

I confirmed the following Dockerfile works on Ubuntu 18.04 LTS

from python:3.6-buster

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

ENV PATH /usr/local/nvidia/bin/:$PATH
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64

# Tell nvidia-docker the driver spec that we need as well as to
# use all available devices, which are mounted at /usr/local/nvidia.
# The LABEL supports an older version of nvidia-docker, the env
# variables a newer one.
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
LABEL com.nvidia.volumes.needed="nvidia_driver"

WORKDIR /

# Install base packages.
RUN apt-get update --fix-missing && apt-get install -y \
    bzip2 \
    ca-certificates \
    curl \
    gcc \
    git \
    libc-dev \
    libglib2.0-0 \
    libsm6 \
    libxext6 \
    libxrender1 \
    wget \
    libevent-dev \
    build-essential && \
    rm -rf /var/lib/apt/lists/*
RUN pip install torchdistill

You can confirm the torchdistill is successfully installed by the following commands

sudo docker build -t torchdistill/test:0.0.2 .
sudo docker run -it torchdistill/test:0.0.2 /bin/bash
python
import torchdistill

Hope this helps