generated from bluegreen-labs/R_project_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (30 loc) · 1.21 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# For NVIDIA acceleration make sure to
# enable the NVIDIA container toolkit
# ubuntu/jammy is the default image,
# nvidia/cuda is the old nvidia image
# pytorch the newer pytorch image which
# might conflict with a tensorflow Install
# if acceleration is desired
# FROM ubuntu/jammy
FROM nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04
#FROM nvcr.io/nvidia/pytorch:24.05-py3
# FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-devel
# copy package content
COPY environment.yml .
# Install base utilities
RUN apt-get update
RUN apt-get install -y build-essential wget software-properties-common
# install libraries
RUN apt-get install -y libgl1 libavcodec-dev libavformat-dev libswscale-dev \
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev \
libgtk2.0-dev libgtk-3-dev libpng-dev libjpeg-dev \
libopenexr-dev libtiff-dev libwebp-dev
# install miniconda
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
RUN /bin/bash ~/miniconda.sh -b -p /opt/conda
# recreate and activate the environment
# suppress TF log level output
RUN /opt/conda/bin/conda env create -f environment.yml
RUN echo "source activate weahtr" > ~/.bashrc
ENV PATH $CONDA_DIR/bin:$PATH