Skip to content

Instantly share code, notes, and snippets.

View epifanio's full-sized avatar

Massimo Di Stefano epifanio

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@epifanio
epifanio / demo.py
Last active January 31, 2023 07:35
from PyQt5.QtWidgets import *
from qgis.PyQt.QtGui import (
QColor,
)
import cudf
import cuspatial
print("cudf version: ", cudf.__version__)
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from jupyter_core.paths import jupyter_data_dir
import subprocess
import os
import errno
import stat
c = get_config() # noqa: F821
#!/bin/bash
. /opt/conda/etc/profile.d/conda.sh
conda activate base
git clone https://github.com/epifanio/cuspatial /home/jovyan/cuspatial && cd /home/jovyan/cuspatial && git checkout gdal362
export CUSPATIAL_HOME=/home/jovyan/cuspatial
conda env create --name all_cuda-118_arch-x86_64 --file conda/environments/all_cuda-118_arch-x86_64.yaml
#!/bin/bash
# set permissions on a directory
# after any installation, if a directory needs to be (human) user-writable,
# run this script on it.
# It will make everything in the directory owned by the group $NB_GID
# and writable by that group.
# Deployments that want to set a specific user id can preserve permissions
# by adding the `--group-add users` line to `docker run`.
# uses find to avoid touching files that already have the right permissions,
ARG MOTHER=epinux/jammy_mamba_gpu:desktop
FROM $MOTHER
LABEL maintainer="massimods@met.no"
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
RUN mamba install --yes git
COPY build_cuspatial.sh /home/jovyan/build_cuspatial.sh
Removing intermediate container b1ed73f80132
---> 08d48161dd06
Step 20/22 : RUN cd /home/jovyan/cuspatial && chmod a+x build.sh && ./build.sh
---> Running in 62247221d9c0
File /opt/conda/envs/gis/lib64/stubs/libcuda.so doesn't exist
Building for the architecture of the GPU in the system...
-- The C compiler identification is GNU 9.5.0
-- The CXX compiler identification is GNU 9.5.0
-- The CUDA compiler identification is unknown
celery_1 | [2023-01-26 08:00:36,026: INFO/MainProcess] Task satpy_pygeoapi_plugin.process_netcdf.execute[83f43a26-9d4f-11ed-92b6-0242c0a82004] received
celery_1 | [2023-01-26 08:00:36,026: DEBUG/MainProcess] TaskPool: Apply <function fast_trace_task at 0x7f17278e9120> (args:('satpy_pygeoapi_plugin.process_netcdf.execute', '83f43a26-9d4f-11ed-92b6-0242c0a82004', {'lang': 'py', 'task': 'satpy_pygeoapi_plugin.process_netcdf.execute', 'id': '83f43a26-9d4f-11ed-92b6-0242c0a82004', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 0, 'timelimit': [None, None], 'root_id': '83f43a26-9d4f-11ed-92b6-0242c0a82004', 'parent_id': None, 'argsrepr': "({'message': 'An optional message.', 'name': 'netcdf', 'netcdf_file': '/data/noaa19-avhrr-20230124115334-20230124120327.nc'}, {'message': 'An optional message.', 'name': 'netcdf', 'netcdf_file': '/data/noaa19-avhrr-20230124115334-20230124120327.nc'})", 'kwargsrepr': '{}', 'origin': 'gen84@pygeoapi', 'ignore_result': False, 'prope