Skip to content

Commit

Permalink
Merge pull request #65 from Julia-meets-String-Theory/vmm
Browse files Browse the repository at this point in the history
Fixed Docker and various updates to functions
  • Loading branch information
vmmhep authored Jun 28, 2024
2 parents 2e15c29 + 9e7609a commit f0e6e7e
Show file tree
Hide file tree
Showing 40 changed files with 4,780 additions and 483 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/Manifest.toml
.vscode/settings.json
src/clipboard.jl
jlm_python/multi_solver_phase_fraction.py
jlm_python/one_dim_phase_fraction.py
.DS_Store
44 changes: 30 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
RUN apt-get -yqq install autoconf build-essential nano cmake libgmp-dev libcgal-dev\
libmpc-dev libsuitesparse-dev libppl-dev libeigen3-dev\
libc6 libcdd0d libgmp10 libgmpxx4ldbl libstdc++6 palp\
libflint-dev libflint-arb-dev python3 python3-pip\
wget libmath-libm-perl python3-venv normaliz git
libflint-dev libflint-arb-dev python3 python3-pip curl\
wget libmath-libm-perl python3-venv normaliz libqsopt-ex2 git

# Make a soft link to the arb library and flint headers so that python-flint can install
RUN ln -s /usr/lib/${AARCH}-linux-gnu/libflint-arb.so /usr/lib/${AARCH}-linux-gnu/libarb.so
Expand All @@ -30,27 +30,35 @@ RUN groupadd -r -g $USERID $USERNAME && useradd -r -s /bin/bash -u $USERID -g $U
|| echo "Skipping user creation"
USER $USERNAME

# Install Rust since there are some Python packages that now depend on it
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/home/${USERNAME}/.cargo/bin:${PATH}"

# Create python virtual environment for non-root user
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# Install julia
WORKDIR /opt/cytools/
RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.1-linux-x86_64.tar.gz
RUN tar xf julia-1.7.1-linux-x86_64.tar.gz
ENV PATH="$PWD/julia-1.7.1/bin:$PATH"
RUN ln -s $PWD/julia-1.7.1/bin/julia $VIRTUAL_ENV/bin/julia
RUN rm julia-1.7.1-linux-x86_64.tar.gz

RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.4-linux-x86_64.tar.gz
RUN tar xf julia-1.8.4-linux-x86_64.tar.gz
ENV PATH="$PWD/julia-1.8.4/bin:$PATH"
RUN ln -s $PWD/julia-1.8.4/bin/julia $VIRTUAL_ENV/bin/julia
RUN rm julia-1.8.4-linux-x86_64.tar.gz
# RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.1-linux-x86_64.tar.gz
# RUN tar xf julia-1.7.1-linux-x86_64.tar.gz
# ENV PATH="$PWD/julia-1.7.1/bin:$PATH"
# RUN ln -s $PWD/julia-1.7.1/bin/julia $VIRTUAL_ENV/bin/julia
# RUN rm julia-1.7.1-linux-x86_64.tar.gz

# Install pip packages
# Install pip packages
ENV CVXOPT_SUITESPARSE_INC_DIR=/usr/include/suitesparse
RUN pip3 install --upgrade pip
RUN pip3 install pip==21.0.1
RUN pip3 install numpy scipy jupyterlab cvxopt gekko pymongo ortools tqdm cython qpsolvers osqp
RUN pip3 install python-flint matplotlib h5py
RUN pip3 install scikit-sparse cysignals gmpy2==2.1.0a4
RUN pip3 install scikit-sparse cysignals gmpy2
RUN pip3 install pplpy
RUN pip3 install julia
RUN pip3 install -f https://download.mosek.com/stable/wheel/index.html Mosek
ENV MOSEKLM_LICENSE_FILE=/home/$USERNAME/mounted_volume/mosek/mosek.lic

Expand All @@ -60,8 +68,15 @@ RUN sed -i -e 's/mosek.solsta.near_optimal/ /g' $VIRTUAL_ENV/lib/python3.9/site-

# Install TOPCOM
WORKDIR /opt/cytools/external/topcom-mod
RUN wget https://github.com/LiamMcAllisterGroup/topcom/releases/download/v0.17.8%2Bds-2%2Bcytools-1/topcom_0.17.8+ds-2+cytools-1_${ARCH}.deb
RUN dpkg -i topcom_0.17.8+ds-2+cytools-1_${ARCH}.deb
RUN wget https://github.com/LiamMcAllisterGroup/topcom/releases/download/v1.1.2%2Bds-1%2Bcytools-1/topcom_1.1.2+ds-1+cytools-1_${ARCH}.deb
RUN wget https://github.com/LiamMcAllisterGroup/topcom/releases/download/v1.1.2%2Bds-1%2Bcytools-1/libtopcom0_1.1.2+ds-1+cytools-1_${ARCH}.deb
RUN wget https://github.com/LiamMcAllisterGroup/topcom/releases/download/v1.1.2%2Bds-1%2Bcytools-1/libtopcom-dev_1.1.2+ds-1+cytools-1_${ARCH}.deb
RUN dpkg -i topcom_1.1.2+ds-1+cytools-1_${ARCH}.deb
RUN dpkg -i libtopcom0_1.1.2+ds-1+cytools-1_${ARCH}.deb
RUN dpkg -i libtopcom-dev_1.1.2+ds-1+cytools-1_${ARCH}.deb

# Download file from github to keep track of the number of downloads
RUN wget https://github.com/LiamMcAllisterGroup/cytools/releases/download/v1.0.0/download_counter.txt

# Copy code and installer
COPY . /opt/cytools/
Expand All @@ -70,7 +85,7 @@ RUN python3 setup.py install

# Copy CYAxiverse.jl package
WORKDIR /opt/
RUN git clone -b dev https://github.com/vmmhep/CYAxiverse.jl.git
RUN git clone -b vmm https://github.com/Julia-meets-String-Theory/CYAxiverse.jl.git
WORKDIR /opt/CYAxiverse.jl/
ENV PYTHON="$VIRTUAL_ENV/bin/python3"
RUN julia --project="/opt/CYAxiverse.jl/" add_CYAxiverse.jl
Expand Down Expand Up @@ -103,6 +118,7 @@ WORKDIR /home/$USERNAME/mounted_volume

# Start jupyter lab by default
USER $USERNAME

ENV JULIA_REVISE_POLL=1
EXPOSE 8996
ENV newARGS="docker"
Expand Down
32 changes: 32 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ ArbNumerics = "7e558dbc-694d-5a72-987c-6f4ebed21442"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
ClusterManagers = "34f1f09b-3a8b-5176-ab39-66d58a4d544e"
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Expand All @@ -19,30 +22,59 @@ DrWatson = "634d3b9d-ee7a-5ddf-bec9-22491ea816e1"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
GenericLinearAlgebra = "14197337-ba66-59df-a3e3-ca00e7dcff7a"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807"
LeftChildRightSiblingTrees = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e"
LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
MPIClusterManagers = "e7922434-ae4b-11e9-05c5-9780451d2c66"
MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a"
NormalForms = "109d20d8-9763-411c-9b60-7eb2a068657f"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
ProfileSVG = "132c30aa-f267-4189-9183-c8a63c7e05e6"
ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
QRCoders = "f42e9828-16f3-11ed-2883-9126170b272d"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
Tullio = "bc48ee85-29a4-5162-ae0b-a64e1601d4bc"

[compat]
julia = "1.7"
AbstractTrees = "=0.4.3"
ArbNumerics = "=1.3.3"
BenchmarkTools = "=1.3.2"
CairoMakie = "=0.10.0"
ClusterManagers = "=0.4.3"
ColorSchemes = "=3.20.0"
Conda = "=1.7.0"
DifferentialEquations = "=7.7.0"
Distributions = "=0.25.60"
Documenter = "=0.27.20"
DrWatson = "=2.12.0"
ForwardDiff = "=0.10.32"
GenericLinearAlgebra = "=0.3.3"
HDF5 = "=0.16.11"
IntervalArithmetic = "=0.20.7"
LoopVectorization = "=0.12.140"
MPI = "=0.20.0"
Nemo = "=0.32.0"
NormalForms = "=0.1.0"
Optim = "=1.7.0"
Roots = "=2.0.0"
Tullio = "=0.3.4"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
Loading

0 comments on commit f0e6e7e

Please sign in to comment.