Skip to content

Commit

Permalink
Adding dockerfile for pytorch.
Browse files Browse the repository at this point in the history
  • Loading branch information
freebacca committed Mar 31, 2023
1 parent 232c540 commit a1f45c0
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
.DS_Store
47 changes: 47 additions & 0 deletions Dockerfile_torch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#==================================================================================
# Copyright (c) 2022 Northeastern University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#==================================================================================

FROM ubuntu:20.04
ARG password=ChangeMe

# Set timezone
ENV TZ=America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y openssh-server htop nano vim

# These are required to enable ssh connection to use it on colosseum
RUN ssh-keygen -A
RUN mkdir -p /run/sshd
RUN echo "root:${password}" | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config

# Delete apt libraries to reduce the size of the final image
RUN rm -rf /var/lib/apt/lists/*

# Install sudo, git , tmux python3-is-python, gcc, g++, make, cmake, python3-distutils, python3-apt, python3-pip
RUN apt-get update && apt-get install -y sudo git tmux python-is-python3 gcc g++ make cmake python3-distutils python3-apt python3-pip

# Install python packages
RUN pip3 install --upgrade pip
RUN pip3 install numpy pandas matplotlib seaborn scikit-learn scipy

# install pytorch
RUN pip3 install torch torchvision torchaudio

WORKDIR /workspace

# This command will be always overwritten by the system
CMD ["/usr/sbin/sshd", "-D"]

0 comments on commit a1f45c0

Please sign in to comment.