1adrianb / 1adrianb/human-pose-estimation

Suggestion of Dockerfile for easy installation

未關閉 適合新手
#4 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Lua
星號
109
分支
41
PR 合併指標
30 天內沒有已合併 PR

描述

I have found it rather tedious to deploy torch and its dependencies on my computer.
Here is a dockerfile I wrote to do the job pretty much automatically (note that it requires the nvidia wrapper to docker):

https://gist.github.com/pixelou/e06d8b049001254575d745be2b2b0402

```dockerfile
FROM nvidia/cuda:8.0-cudnn5-devel

WORKDIR /root

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y --no-install-recommends openssl ca-certificates \
git-core cmake curl wget unzip gfortran libreadline-dev ncurses-dev \
libgoogle-glog-dev libboost-dev libboost-thread-dev libopenblas-dev

# Core Torch packages
RUN git clone https://github.com/torch/luajit-rocks.git
RUN cd luajit-rocks && mkdir build && cd build \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
-DWITH_LUAJIT21=ON -DLUAJIT_ENABLE_LUA52COMPAT=ON .. \
&& make && make install
RUN luarocks install torch
RUN luarocks install trepl

# Common torch package
RUN luarocks install luafilesystem
RUN luarocks install --server=http://luarocks.org/dev luash
RUN luarocks install nn
RUN luarocks install optnet
RUN luarocks install xlua
RUN luarocks install cudnn

# Extra torch package
RUN apt-get install -y --no-install-recommends libjpeg-dev libpng-dev \
graphicsmagick-imagemagick-compat
RUN luarocks install image
RUN apt-get install -y --no-install-recommends python2.7-dev python-numpy
RUN git clone https://github.com/facebook/thpp.git
RUN cd thpp/thpp && mkdir build && cd build \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
-DNO_THRIFT=ON -DNO_FOLLY=ON -DNO_TESTS=ON .. \
&& make && make install
RUN luarocks install fbpython

# Pull project
RUN git clone https://github.com/1adrianb/human-pose-estimation

CMD /bin/bash
```

deploy like so:

```bash
curl -O https://gist.githubusercontent.com/pixelou/e06d8b049001254575d745be2b2b0402/raw/9585f22ba540a2fb07b54c4c3b8e314a53010199/Dockerfile
nvidia-docker build -t humposest -f ./Dockerfile
nvidia-docker run -it humposest bash
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

Dockerfile 在 issue 正文中提供。首先檢查儲存庫的根目錄,看是否已存在 Dockerfile。如果不存在,請根據提供的範例建立一個新的 Dockerfile。使用 nvidia-docker(或支援 GPU 的 Docker)測試建置映像,並確保容器能夠執行專案的示範。驗證安裝步驟是否與任何 README 或文件中列出的專案相依項目相符。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
bash, cmake, docker, git
領域
devops, tooling
Issue 類型
功能
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
75/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。