Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Dockerfile 3.2 KB

You have to be logged in to leave a comment. Sign In
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
  1. # Anaconda3 base image
  2. FROM continuumio/anaconda3
  3. # get Cuda working https://gitlab.com/nvidia/container-images/cuda/blob/master/dist/ubuntu18.04/10.1/base/Dockerfile
  4. RUN apt-get update && apt-get install -y --no-install-recommends \
  5. gnupg2 curl ca-certificates && \
  6. curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \
  7. echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
  8. echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list && \
  9. apt-get purge --autoremove -y curl && \
  10. rm -rf /var/lib/apt/lists/*
  11. ENV CUDA_VERSION 10.1.243
  12. ENV CUDA_PKG_VERSION 10-1=$CUDA_VERSION-1
  13. # For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
  14. RUN apt-get update && apt-get install -y --no-install-recommends \
  15. cuda-cudart-$CUDA_PKG_VERSION \
  16. cuda-compat-10-1 && \
  17. ln -s cuda-10.1 /usr/local/cuda && \
  18. rm -rf /var/lib/apt/lists/*
  19. # Required for nvidia-docker v1
  20. RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
  21. echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
  22. ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
  23. ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
  24. # nvidia-container-runtime
  25. ENV NVIDIA_VISIBLE_DEVICES all
  26. ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
  27. ENV NVIDIA_REQUIRE_CUDA "cuda>=10.1 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411"
  28. # Update?, install tmux nano gcc
  29. RUN apt-get update \
  30. && apt-get install -y tmux nano gcc
  31. # Pip installs from requirements.txt
  32. COPY requirements.txt .
  33. RUN pip install -r requirements.txt
  34. # add a user called ubuntu for all subsequent layers
  35. RUN adduser --disabled-password --gecos '' ubuntu \
  36. && adduser ubuntu sudo \
  37. && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
  38. USER ubuntu
  39. WORKDIR /home/ubuntu
  40. COPY .bashrc /home/ubuntu/
  41. # Install j_utils
  42. ADD https://api.github.com/repos/jmhsi/j_utils/git/refs/heads/master j_utils_version.json
  43. RUN git clone https://github.com/jmhsi/j_utils.git \
  44. && cd j_utils \
  45. && pip install --user -e .
  46. # Run below uses github api to make sure docker build doesn't use cached version of git cloned repo
  47. ADD https://api.github.com/repos/jmhsi/lendingclub/git/refs/heads/master lendingclub_version.json
  48. # Clone the lendingclub repo and cythonize inside csv_preparation, move cython to csv_prep dir
  49. RUN git clone https://github.com/jmhsi/lendingclub.git \
  50. #RUN git clone git@github.com:jmhsi/lendingclub.git \
  51. && cd lendingclub \
  52. && git pull \
  53. && pip install --user -e . \
  54. && cd lendingclub/csv_preparation \
  55. && python setup.py build_ext \
  56. && echo $(pwd) \
  57. && echo $(ls build/lib.linux-x86_64-3.7/lendingclub/csv_preparation) \
  58. && mv build/lib.linux-x86_64-3.7/lendingclub/csv_preparation/rem_to_be_paid.cpython-37m-x86_64-linux-gnu.so .
  59. # Expose port for jupyter notebook
  60. EXPOSE 3224
  61. #CMD ["jupyter", "notebook", "--no-browser","--NotebookApp.token=''","--NotebookApp.password=''"]
  62. #CMD ['/bin/bash', "cd]
  63. #ADD hello.py /home/ubuntu/
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...