Release/1.0 (#156)

* update to Hydra 1.1
* add bash folder with scripts for conda setup and run scheduling
* add saving seed in `log_hyperparameters()` method
* redesign Dockerfile to make it weight less
* add `test_after_training` parameter to config
* add inheritance to trainer configs
* remove forcing ddp-friendly configuration
* refactor tests
* remove conda_env_gpu.yaml
* remove default langage version from pre-commit config
* add mnist datamodule unit test
* rename test folder from 'smoke' to 'shell'
* remove wandb import from utils.py
* change 'use_artifact' to 'log_artifact' in wandb callbacks
* add rank zero decorator to wandb callbacks
* add dumping rich tree config to file
* get rid of `=` character in ckpt names
* update requirements.txt
* update LICENSE
* update README.md
This commit is contained in:
Łukasz Zalewski authored and GitHub committed 2021-07-21 03:37:45 +02:00
1 parent 362a4beebb
commit d45f604bc8
35 files changed
+398 -424

No files matched your search

+48 -14
View File
@@ -1,23 +1,57 @@
# Build: docker build -t project_name .
# Run: docker run -v $(pwd):/workspace/project --gpus all -it --rm project_name
# Build: sudo docker build -t <project_name> .
# Run: sudo docker run -v $(pwd):/workspace/project --gpus all -it --rm <project_name>
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
ENV CONDA_ENV_NAME=myenv
ENV PYTHON_VERSION=3.8
# Basic setup
RUN apt update
RUN apt install -y bash \
build-essential \
git \
curl \
ca-certificates \
wget \
&& rm -rf /var/lib/apt/lists
# Build from official Nvidia PyTorch image
# GPU-ready with Apex for mixed-precision support
# https://ngc.nvidia.com/catalog/containers/nvidia:pytorch
# https://docs.nvidia.com/deeplearning/frameworks/support-matrix/
FROM nvcr.io/nvidia/pytorch:21.05-py3
# Set working directory
WORKDIR /workspace/project
# Copy files to create conda environment
COPY conda_env_gpu.yaml requirements.txt ./
# Install Miniconda and create main env
ADD https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh miniconda3.sh
RUN /bin/bash miniconda3.sh -b -p /conda \
&& echo export PATH=/conda/bin:$PATH >> .bashrc \
&& rm miniconda3.sh
ENV PATH="/conda/bin:${PATH}"
RUN conda create -n ${CONDA_ENV_NAME} python=${PYTHON_VERSION}
# Create myenv
RUN conda env create -f conda_env_gpu.yaml -n myenv \
&& conda init bash
# Switch to bash shell
SHELL ["/bin/bash", "-c"]
# Set myenv to default virtual environment
RUN echo "source activate myenv" >> ~/.bashrc
# Install requirements
COPY requirements.txt ./
RUN source activate ${CONDA_ENV_NAME} \
&& pip install --no-cache-dir -r requirements.txt \
&& rm requirements.txt
# Uncomment this to install Apex for mixed-precision support
# RUN source activate ${CONDA_ENV_NAME} \
# && git clone https://github.com/NVIDIA/apex \
# && cd apex \
# && pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ \
# && cd .. \
# && rm -r apex
# Set ${CONDA_ENV_NAME} to default virutal environment
RUN echo "source activate ${CONDA_ENV_NAME}" >> ~/.bashrc