This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| # train.py | |
| # Xavier Vasques 13/04/2021 | |
| import platform; print(platform.platform()) | |
| import sys; print("Python", sys.version) | |
| import numpy; print("NumPy", numpy.__version__) | |
| import scipy; print("SciPy", scipy.__version__) | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 | |
| ENV NVIDIA_VISIBLE_DEVICES=all | |
| ENV NVIDIA_DRIVER_CAPABILITIES=all | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # configure locale | |
| ENV LANG en_US.UTF-8 | |
| ENV LANGUAGE en_US:en | |
| ENV LC_ALL en_US.UTF-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM pytorch/pytorch:1.9.0-cuda11.1-cudnn8-devel | |
| RUN apt-get update & apt-get -y install bc unzip git htop vim ffmpeg libsm6 libxext6 libgl1-mesa-glx | |
| RUN pip install jupyterlab | |
| RUN pip install matplotlib | |
| RUN pip install opencv-python | |
| RUN pip install scikit-image | |
| RUN pip install scikit-learn | |
| RUN pip install seaborn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 | |
| RUN apt-get update && apt-get -y upgrade | |
| RUN apt-get install -y --no-install-recommends git wget | |
| RUN apt-get install -y software-properties-common vim ssh | |
| RUN apt-get install -y python3 | |
| RUN apt-get install -y python3-dev python3-pip build-essential |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ADMIN="[email protected]" | |
| # set alert-level 90 % standard | |
| ALERT=10 | |
| df -h | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $6 }' | while read output; | |
| do | |
| usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 ) | |
| partition=$(echo $output | awk '{ print $2 }' ) | |
| if [ $usep -ge $ALERT ]; then | |
| echo "space low on \"$partition ($usep%)\", on server $(hostname) at $(date)" | | |
| mail -s "Alert: Free space low, $usep % used on $partition" $ADMIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| [email protected] [email protected] | |
| df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while | |
| read output; | |
| do | |
| echo $output | |
| usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 ) | |
| parition=$(echo $output | awk '{ print $2 }' ) | |
| if [ $usep -ge 75 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # www.fduran.com | |
| # script that will send an email to EMAIL when disk use in partition PART is bigger than %MAX | |
| # adapt these 3 parameters to your case | |
| MAX=95 | |
| [email protected] | |
| PART=sda1 | |
| USE=`df -h |grep $PART | awk '{ print $5 }' | cut -d'%' -f1` | |
| if [ $USE -gt $MAX ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; | |
| do | |
| echo $output | |
| used=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 ) | |
| partition=$(echo $output | awk '{ print $2 }' ) | |
| if [ $usep -ge 80 ]; then | |
| echo "The partition \"$partition\" on $(hostname) has used $used% at $(date)" | mail -s "Disk space alert: $used% used" [email protected] | |
| fi | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sample from @citizen428 https://dev.to/citizen428/comment/6cmh | |
| FROM golang:alpine as build | |
| RUN apk add --no-cache ca-certificates | |
| WORKDIR /build | |
| ADD . . | |
| RUN CGO_ENABLED=0 GOOS=linux \ | |
| go build -ldflags '-extldflags "-static"' -o app | |
| FROM scratch | |
| COPY --from=build /etc/ssl/certs/ca-certificates.crt \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM golang:alpine AS build | |
| RUN sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories | |
| RUN apk upgrade --update-cache --available | |
| RUN apk add --no-cache \ | |
| gcc \ | |
| libc-dev \ | |
| librdkafka-dev=1.3.0-r0 \ | |
| pkgconf | |
| RUN mkdir /app | |
| WORKDIR /app |
NewerOlder