-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
starlord
committed
May 29, 2017
1 parent
1c333cc
commit 93d1da3
Showing
4 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM ubuntu:latest | ||
|
||
# Install dependencies | ||
RUN apt-get update -y \ | ||
&& apt-get install -yqq libssl-dev git-core sudo \ | ||
&& apt-get clean | ||
|
||
# Install torch and cutorch 1.0-0 | ||
RUN git clone https://github.com/torch/distro.git /torch --recursive \ | ||
&& cd /torch \ | ||
&& /bin/bash install-deps \ | ||
&& sed -i 's/cutorch-scm-1.rockspec/cutorch-1.0-0.rockspec/g' install.sh \ | ||
&& ./install.sh -b \ | ||
&& apt-get clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
DOCKER_IMAGE='cutorch' | ||
CONTAINER_USERNAME='cutorch' | ||
CONTAINER_GROUPNAME='cutorch' | ||
HOMEDIR=/home/${CONTAINER_USERNAME} | ||
GROUP_ID=$(id -g) | ||
USER_ID=$(id -u) | ||
|
||
create_user_cmd() | ||
{ | ||
echo \ | ||
groupadd -f -g ${GROUP_ID} ${CONTAINER_GROUPNAME} '&&' \ | ||
useradd -u ${USER_ID} -g ${CONTAINER_GROUPNAME} ${CONTAINER_USERNAME} '&&' \ | ||
mkdir --parent ${HOMEDIR} '&&' \ | ||
chown -R ${CONTAINER_USERNAME}:${CONTAINER_GROUPNAME} ${HOMEDIR} | ||
} | ||
|
||
execute_as_cmd() | ||
{ | ||
echo sudo -u ${CONTAINER_USERNAME} HOME=${HOMEDIR} | ||
} | ||
|
||
full_container_cmd() | ||
{ | ||
echo "$(create_user_cmd) && $(execute_as_cmd) $@" | ||
} | ||
|
||
nvidia-docker run -it --rm -p 8888:8888 -v "$(pwd)":"${HOMEDIR}" -w "${HOMEDIR}" "${DOCKER_IMAGE}" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
FROM tensorflow/tensorflow:latest-gpu | ||
RUN apt-get update -y && apt-get install sudo -y | ||
|
||
# Install dependencies | ||
RUN apt-get update -y \ | ||
&& apt-get install -yqq libssl-dev git-core sudo \ | ||
&& apt-get clean | ||
|
||
# Install needed python packages | ||
RUN pip install keras \ | ||
pandas-datareader \ | ||
quandl \ | ||
h5py \ | ||
git+https://github.com/tflearn/tflearn.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters