forked from kkteru/grail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (43 loc) · 1.44 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Base image
FROM nvidia/cuda:11.4.3-devel-ubuntu20.04
# Set environment variables to prevent interactive prompts during installation
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install tmux
# Add the deadsnakes PPA for Python 3.10
RUN apt-get update && apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && apt-get install -y \
wget \
git \
zip \
unzip \
curl \
build-essential \
libssl-dev \
libffi-dev \
python3.10 \
python3.10-venv \
python3.10-dev \
python3-pip && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Update alternatives to set Python 3.10 as the default
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && \
update-alternatives --config python3 && \
python3 --version
# Install the latest version of pip manually
RUN wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py && \
rm get-pip.py
# Copy the entire current folder to the container
COPY . /home/
# Set working directory
WORKDIR /home/grail
# Install Python dependencies
RUN pip install -r requirements.txt
# Install additional utilities commonly used in deep learning projects
RUN pip install jupyterlab ipython matplotlib seaborn
# Expose a default port for Jupyter
EXPOSE 8888
# Default command
CMD ["bash"]
# Run this --> docker run --gpus all -it -p 8899:8888 -v $(pwd):/home/grail grail