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 | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |
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
version: '3.1' | |
services: | |
db: | |
image: mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: CHANGE_THIS_PASSWORD | |
MYSQL_DATABASE: test_db |
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:2.1.0-cuda11.8-cudnn8-runtime | |
ARG USER="user" | |
ARG UID="1000" | |
ARG GID="100" | |
USER "root" | |
RUN apt-get update && apt-get install -y gnupg |
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 copy import deepcopy | |
from typing import Any, Dict, Generator, List, Optional, Union | |
from typing import NamedTuple, Tuple | |
from gymnasium import spaces | |
import numpy as np | |
import torch as th | |
from stable_baselines3.common.buffers import BaseBuffer | |
from stable_baselines3.common.vec_env import VecNormalize |
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
# Based on min-char-rnn.py | |
# https://gist.github.com/karpathy/d4dee566867f8291f086 | |
import torch as th | |
import torch.nn as nn | |
import numpy as np | |
class Model(nn.Module): | |
def __init__(self, hidden_size, vocab_size, num_layers): |
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
import numpy as np | |
def spirals(n_samples=400): | |
N = n_samples | |
theta = np.sqrt(np.random.rand(N))*2*np.pi | |
r_a = 2*theta + np.pi | |
data_a = np.array([np.cos(theta)*r_a, np.sin(theta)*r_a]).T | |
x_a = data_a + np.random.randn(N,2) |
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:2.1.0-cuda11.8-cudnn8-runtime | |
ARG USER="user" | |
ARG UID="1000" | |
ARG GID="100" | |
USER "root" | |
RUN apt-get update && apt-get install -y gnupg |
OlderNewer