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

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

Comments

Loading...