- Install cuda
- Export variables in
~/.bashrc
or~/.zshrc
.
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda
# timed.sh | |
ulimit -n 3000 # increase to avoid "out of file descriptors" error | |
python server.py & | |
sleep 1 # Wait for server to start | |
/usr/bin/time --format "Memory usage: %MKB\tTime: %e seconds\tCPU usage: %P" "$@" |
# server.py | |
from aiohttp import web | |
import asyncio | |
import random | |
async def handle(request): | |
await asyncio.sleep(random.randint(0, 3)) | |
return web.Response(text="Hello, World!") |
from aiohttp import ClientSession | |
from pypeln import io | |
import asyncio | |
import sys | |
async def fetch(url, session): | |
async with session.get(url) as response: | |
return await response.read() | |
async def main(): |
rsync --exclude-from=.gitignore -avz -e ssh . $1 | |
while inotifywait -r -e modify,create,delete . ; do | |
rsync --exclude-from=.gitignore -avz --delete -e ssh . $1 | |
done |
~/.bashrc
or ~/.zshrc
.export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda
docker-compose.yml
file dodocker-compose up
defmodule Streamer do | |
def async(enum) do | |
Stream.resource( | |
#Start | |
fn -> | |
origin = self | |
spawn fn -> | |
for x <- enum do | |
send origin, {:elem, x} | |
end |