mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+micromamba (#2681)
This commit is contained in:
parent
9c56216f04
commit
d5b7afbf6e
2 changed files with 68 additions and 0 deletions
48
projects/github.com/mamba-org/micro/package.yml
Normal file
48
projects/github.com/mamba-org/micro/package.yml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
versions:
|
||||||
|
github: mamba-org/micromamba-releases
|
||||||
|
strip: /-\d+$/
|
||||||
|
#FIXME ^^ versions are eg. 1.2.3-1 where the releases are usually -0
|
||||||
|
# ^^ and revisions are increments of 1 so this is actually a 4th version
|
||||||
|
# ^^ number for us that we need to extract
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/micromamba
|
||||||
|
|
||||||
|
warnings:
|
||||||
|
- vendored
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- darwin
|
||||||
|
# broken on linux pending https://github.com/mamba-org/mamba/issues/2650
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
curl.se/ca-certs: '*'
|
||||||
|
|
||||||
|
runtime:
|
||||||
|
env:
|
||||||
|
REQUESTS_CA_BUNDLE: ${{deps.curl.se/ca-certs.prefix}}/ssl/cert.pem
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
curl.se: '*'
|
||||||
|
sourceware.org/bzip2: '*'
|
||||||
|
working-directory: "{{prefix}}"
|
||||||
|
script: |
|
||||||
|
curl -L \
|
||||||
|
"https://github.com/mamba-org/micromamba-releases/releases/download/{{version.tag}}/micromamba-$PID.tar.bz2" \
|
||||||
|
| tar xj
|
||||||
|
rm -rf info
|
||||||
|
env:
|
||||||
|
linux/x86-64: {PID: linux-64}
|
||||||
|
linux/aarch64: {PID: linux-aarch64}
|
||||||
|
darwin/x86-64: {PID: osx-64}
|
||||||
|
darwin/aarch64: {PID: osx-arm64}
|
||||||
|
|
||||||
|
test:
|
||||||
|
- micromamba | grep {{version}}
|
||||||
|
|
||||||
|
- |
|
||||||
|
eval "$(micromamba shell hook --shell bash)"
|
||||||
|
micromamba create numpy --channel anaconda --prefix mm-prefix --yes
|
||||||
|
micromamba activate mm-prefix
|
||||||
|
./test.py
|
20
projects/github.com/mamba-org/micro/test.py
Executable file
20
projects/github.com/mamba-org/micro/test.py
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# https://www.pugetsystems.com/labs/hpc/standalone-python-conda-envs-without-installing-conda-using-micromamba-2287/
|
||||||
|
|
||||||
|
"""
|
||||||
|
Matrix multiplication of 2 n x n matrices
|
||||||
|
"""
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
import time
|
||||||
|
|
||||||
|
n = 8000
|
||||||
|
A = np.array(np.random.rand(n, n))
|
||||||
|
B = np.array(np.random.rand(n, n))
|
||||||
|
C = np.empty_like(A)
|
||||||
|
|
||||||
|
start_time = time.time()
|
||||||
|
C = np.matmul(A, B)
|
||||||
|
run_time = time.time() - start_time
|
||||||
|
|
||||||
|
print( f'{(2e-9 * (n ** 3 + n ** 2)) / run_time :.2f} GFLOPS' )
|
Loading…
Reference in a new issue