-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
104 lines (91 loc) · 2.93 KB
/
Dockerfile
File metadata and controls
104 lines (91 loc) · 2.93 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Fintech Tools Docker Image
# Base: Ubuntu Latest with financial computing tools
FROM ubuntu:latest
# Labels for metadata
LABEL maintainer="Matthew Son"
LABEL description="Containerized Environment for Financial Computing with GPU Support"
LABEL version="0.42"
# Set environment variables to avoid interactive prompts when installing packages (e.g. tzdata)
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=America/New_York
# Set locale
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
# Set Singularity library path for container compatibility
ENV LD_LIBRARY_PATH="/.singularity.d/libs:$LD_LIBRARY_PATH"
# Set working directory
WORKDIR /work_bgfs/g/gson
# Update package lists and install system dependencies
RUN apt-get update && \
apt-get install -y \
locales \
software-properties-common \
gnupg \
build-essential \
pkg-config \
python3 \
python3-pip \
python3-dev \
python3-venv \
python3-setuptools \
openjdk-11-jdk \
libboost-all-dev \
libquantlib0-dev \
libcurl4-openssl-dev \
cmake \
libxml2-dev \
libxml2-utils \
libz-dev \
libbz2-dev \
liblz4-dev \
libzstd-dev \
libsnappy-dev \
libblas-dev \
liblapack-dev \
libopenblas-dev \
libffi-dev \
zlib1g-dev \
libprotobuf-dev \
protobuf-compiler \
libhdf5-dev \
libfontconfig1-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libtiff-dev \
libjpeg-dev \
libcairo2-dev \
libxt-dev \
libfribidi-dev \
libharfbuzz-dev \
pandoc \
git \
nano \
vim \
htop \
wget \
curl \
sudo \
ca-certificates \
openssh-server && \
locale-gen en_US.UTF-8 && \
rm -rf /var/lib/apt/lists/*
# Add R repository and install R
RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | gpg --dearmor -o /usr/share/keyrings/r-project.gpg && \
echo "deb [signed-by=/usr/share/keyrings/r-project.gpg] https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" | tee -a /etc/apt/sources.list.d/cran.list && \
apt-get update && \
apt-get install -y r-base r-base-dev && \
rm -rf /var/lib/apt/lists/*
# Install R packages
RUN R -e "install.packages('RQuantLib', repos = 'https://cloud.r-project.org/', type = 'source', configure.args = c('--with-boost-include=/usr/include/boost/'), configure.vars = c('CPPFLAGS=\"-DQL_HIGH_RESOLUTION_DATE\"', 'LDFLAGS=-L/usr/lib'))"
RUN R -e "install.packages('h2o', repos = 'https://cloud.r-project.org/')"
# Create user matching your credentials: For file permissions
# Then use your actual UID/GID numbers (below is mine)
RUN groupadd -g 10001 usfuser && \
groupadd -g 663800067 circe_access && \
groupadd -g 663800106 sism_group && \
useradd -m -s /bin/bash -u 70230911 -g 10001 -G 663800067,663800106 gson && \
echo "gson ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers # Add gson to sudoers with no password required
# Set default command / User
CMD ["/bin/bash"]
USER gson