-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (61 loc) · 1.72 KB
/
Dockerfile
File metadata and controls
72 lines (61 loc) · 1.72 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
ARG platform="linux/amd64"
FROM --platform=${platform} php:8.2-fpm
# Arguments defined in docker-compose.yml
ARG user
ARG uid
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
python3 \
python3-pip \
wget \
libpq-dev
# MoCHy dependencies
RUN apt-get --yes -qq install \
bzip2 \
cmake \
cpio \
curl \
g++ \
gcc \
gfortran \
git \
gosu \
libblas-dev \
liblapack-dev \
libopenmpi-dev \
openmpi-bin \
python3-dev \
python3-pip \
virtualenv \
wget \
zlib1g-dev \
vim \
htop
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN pip3 install matplotlib python-dotenv requests psycopg --break-system-packages
RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.1-linux-x86_64.tar.gz && tar zxvf julia-1.8.1-linux-x86_64.tar.gz
RUN cp -r julia-1.8.1 /opt/ && ln -s /opt/julia-1.8.1/bin/julia /usr/local/bin/julia
# Install PHP extensions
RUN docker-php-ext-install pdo pdo_pgsql mbstring exif pcntl bcmath gd intl
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Create system user to run Composer and Artisan Commands
RUN useradd -G www-data,root -u $uid -d /home/$user $user
RUN mkdir -p /home/$user/.composer && \
chown -R $user:$user /home/$user
# Set working directory
WORKDIR /var/www
USER $user
RUN python3 -m pip install --user julia --break-system-packages
RUN python3 -c "exec(\"import julia\njulia.install()\")"
RUN julia -e "using Pkg; Pkg.add(\"SimpleHypergraphs\"); Pkg.add(\"Suppressor\")"
WORKDIR /sysimage
RUN python3 -m julia.sysimage sys.so