diff options
Diffstat (limited to 'docker_build')
| -rw-r--r-- | docker_build/Dockerfile | 61 | ||||
| -rw-r--r-- | docker_build/Dockerfile.gpu | 40 | ||||
| -rw-r--r-- | docker_build/ssh-keys/macm4-resident.pub | 1 | ||||
| -rw-r--r-- | docker_build/vimrc | 77 |
4 files changed, 0 insertions, 179 deletions
diff --git a/docker_build/Dockerfile b/docker_build/Dockerfile deleted file mode 100644 index 16f74d6..0000000 --- a/docker_build/Dockerfile +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | FROM rockylinux:9 | ||
| 2 | |||
| 3 | # Install required packages, resolving curl conflict | ||
| 4 | RUN dnf install -y epel-release | ||
| 5 | RUN dnf install -y --allowerasing openssh-server sudo procps-ng \ | ||
| 6 | gcc gcc-c++ make cmake pkg-config openssl-devel libicu-devel perl python3-devel \ | ||
| 7 | nc openssl bat autossh tmux htop tar bmon gzip tree wget \ | ||
| 8 | nano vim unzip net-tools git python3 python3-pip make wireguard-tools usbutils yum xclip \ | ||
| 9 | && dnf clean all | ||
| 10 | |||
| 11 | # Configure SSH | ||
| 12 | RUN mkdir -p /var/run/sshd && \ | ||
| 13 | ssh-keygen -A && \ | ||
| 14 | sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config && \ | ||
| 15 | sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ | ||
| 16 | sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config && \ | ||
| 17 | echo "AllowAgentForwarding yes" >> /etc/ssh/sshd_config | ||
| 18 | # Setup SSH directory for root and ensure root has valid shell | ||
| 19 | RUN mkdir -p /root/.ssh && \ | ||
| 20 | chmod 700 /root/.ssh && \ | ||
| 21 | usermod -s /bin/bash root | ||
| 22 | # Copy SSH public keys from docker_build/ssh-keys directory into the image | ||
| 23 | COPY docker_build/ssh-keys/*.pub /tmp/ssh-keys/ | ||
| 24 | RUN cat /tmp/ssh-keys/*.pub > /root/.ssh/authorized_keys && \ | ||
| 25 | chmod 600 /root/.ssh/authorized_keys && \ | ||
| 26 | rm -rf /tmp/ssh-keys | ||
| 27 | |||
| 28 | # Configure vim | ||
| 29 | COPY docker_build/vimrc /etc/vimrc | ||
| 30 | |||
| 31 | # Configure bash prompt and colors | ||
| 32 | RUN echo 'LS_COLORS=$LS_COLORS:"di=38;5;135:ex=00;32:" ; export LS_COLORS' >> /etc/bashrc && \ | ||
| 33 | echo 'PS1="[\[\033[01;32m\]\u\[\033[00m\]@\h \[\033[38;5;135m\]\W\[\033[00m\]]\$ "' >> /etc/bashrc && \ | ||
| 34 | echo 'export PATH=$PATH:/root/.cargo/bin' >> /root/.bashrc | ||
| 35 | |||
| 36 | # Install Rust and tools for root | ||
| 37 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ | ||
| 38 | echo '[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"' >> ~/.bashrc && \ | ||
| 39 | source "$HOME/.cargo/env" && \ | ||
| 40 | cargo install cargo-clone-crate cargo-edit cargo-info evcxr_jupyter bacon du-dust | ||
| 41 | |||
| 42 | # Install Node.js via nvm and claude-code | ||
| 43 | RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash && \ | ||
| 44 | export NVM_DIR="$HOME/.nvm" && \ | ||
| 45 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
| 46 | nvm install 22 && \ | ||
| 47 | npm install -g @anthropic-ai/claude-code | ||
| 48 | |||
| 49 | # Add nvm to bashrc for future sessions | ||
| 50 | RUN echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc && \ | ||
| 51 | echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bashrc && \ | ||
| 52 | echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"' >> ~/.bashrc | ||
| 53 | |||
| 54 | # Set working directory | ||
| 55 | WORKDIR /root | ||
| 56 | |||
| 57 | # Expose SSH port | ||
| 58 | EXPOSE 22 | ||
| 59 | |||
| 60 | # Start SSH daemon | ||
| 61 | CMD ["/usr/sbin/sshd", "-D", "-e"] | ||
diff --git a/docker_build/Dockerfile.gpu b/docker_build/Dockerfile.gpu deleted file mode 100644 index 7ed08a5..0000000 --- a/docker_build/Dockerfile.gpu +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | # Multi-stage build - GPU version builds on top of the base dev environment | ||
| 2 | FROM rocky_dev:latest | ||
| 3 | |||
| 4 | # Update and install GPU-specific packages | ||
| 5 | RUN dnf update -y && \ | ||
| 6 | dnf install -y kernel-headers kernel-devel pciutils && \ | ||
| 7 | dnf clean all | ||
| 8 | |||
| 9 | # Install NVIDIA container toolkit dependencies | ||
| 10 | RUN dnf config-manager --add-repo https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo && \ | ||
| 11 | dnf install -y nvidia-container-toolkit && \ | ||
| 12 | dnf clean all | ||
| 13 | |||
| 14 | # Set environment variables for NVIDIA | ||
| 15 | ENV NVIDIA_VISIBLE_DEVICES=all | ||
| 16 | ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility | ||
| 17 | |||
| 18 | # Add GPU test script | ||
| 19 | RUN echo '#!/bin/bash' > /usr/local/bin/gpu-test.sh && \ | ||
| 20 | echo 'echo "=== System Information ==="' >> /usr/local/bin/gpu-test.sh && \ | ||
| 21 | echo 'cat /etc/rocky-release' >> /usr/local/bin/gpu-test.sh && \ | ||
| 22 | echo 'echo' >> /usr/local/bin/gpu-test.sh && \ | ||
| 23 | echo 'echo "=== PCI Devices (GPUs) ==="' >> /usr/local/bin/gpu-test.sh && \ | ||
| 24 | echo 'lspci | grep -i nvidia' >> /usr/local/bin/gpu-test.sh && \ | ||
| 25 | echo 'echo' >> /usr/local/bin/gpu-test.sh && \ | ||
| 26 | echo 'echo "=== NVIDIA SMI ==="' >> /usr/local/bin/gpu-test.sh && \ | ||
| 27 | echo 'if command -v nvidia-smi &> /dev/null; then' >> /usr/local/bin/gpu-test.sh && \ | ||
| 28 | echo ' nvidia-smi' >> /usr/local/bin/gpu-test.sh && \ | ||
| 29 | echo 'else' >> /usr/local/bin/gpu-test.sh && \ | ||
| 30 | echo ' echo "nvidia-smi not found. GPU might not be accessible inside container."' >> /usr/local/bin/gpu-test.sh && \ | ||
| 31 | echo 'fi' >> /usr/local/bin/gpu-test.sh && \ | ||
| 32 | chmod +x /usr/local/bin/gpu-test.sh | ||
| 33 | |||
| 34 | # Create workspace directory for GPU workloads | ||
| 35 | RUN mkdir -p /workspace | ||
| 36 | |||
| 37 | # Keep the same working directory and CMD from base image | ||
| 38 | WORKDIR /root | ||
| 39 | EXPOSE 22 | ||
| 40 | CMD ["/usr/sbin/sshd", "-D", "-e"] \ No newline at end of file | ||
diff --git a/docker_build/ssh-keys/macm4-resident.pub b/docker_build/ssh-keys/macm4-resident.pub deleted file mode 100644 index fbccb4f..0000000 --- a/docker_build/ssh-keys/macm4-resident.pub +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIFdHP8n64jOV6Ok7U9TDnGW+LUkXP6V7cvXH6xqN0zcNAAAAEnNzaDptYWNtNC1yZXNpZGVudA== ssh:macm4-resident | ||
diff --git a/docker_build/vimrc b/docker_build/vimrc deleted file mode 100644 index 36583bc..0000000 --- a/docker_build/vimrc +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | " Basic vim configuration for development environment | ||
| 2 | |||
| 3 | " Enable syntax highlighting | ||
| 4 | syntax on | ||
| 5 | |||
| 6 | " Enable line numbers | ||
| 7 | set number | ||
| 8 | |||
| 9 | " Enable relative line numbers for easier navigation | ||
| 10 | set relativenumber | ||
| 11 | |||
| 12 | " Set tab width to 4 spaces | ||
| 13 | set tabstop=4 | ||
| 14 | set shiftwidth=4 | ||
| 15 | set expandtab | ||
| 16 | |||
| 17 | " Enable auto-indentation | ||
| 18 | set autoindent | ||
| 19 | set smartindent | ||
| 20 | |||
| 21 | " Enable incremental search | ||
| 22 | set incsearch | ||
| 23 | |||
| 24 | " Highlight search results | ||
| 25 | set hlsearch | ||
| 26 | |||
| 27 | " Case-insensitive search unless uppercase is used | ||
| 28 | set ignorecase | ||
| 29 | set smartcase | ||
| 30 | |||
| 31 | " Show matching brackets | ||
| 32 | set showmatch | ||
| 33 | |||
| 34 | " Enable mouse support | ||
| 35 | set mouse=a | ||
| 36 | |||
| 37 | " Set backspace behavior | ||
| 38 | set backspace=indent,eol,start | ||
| 39 | |||
| 40 | " Show current line and column | ||
| 41 | set ruler | ||
| 42 | |||
| 43 | " Enable file type detection | ||
| 44 | filetype on | ||
| 45 | filetype plugin on | ||
| 46 | filetype indent on | ||
| 47 | |||
| 48 | " Set color scheme (if available) | ||
| 49 | colorscheme default | ||
| 50 | |||
| 51 | " Enable visual bell instead of beep | ||
| 52 | set visualbell | ||
| 53 | |||
| 54 | " Set encoding | ||
| 55 | set encoding=utf-8 | ||
| 56 | |||
| 57 | " Show command in status line | ||
| 58 | set showcmd | ||
| 59 | |||
| 60 | " Enable wildmenu for command completion | ||
| 61 | set wildmenu | ||
| 62 | |||
| 63 | " Set status line | ||
| 64 | set laststatus=2 | ||
| 65 | set statusline=%F%m%r%h%w\ [%l,%c]\ [%L\ lines] | ||
| 66 | |||
| 67 | " Rust specific settings | ||
| 68 | autocmd FileType rust setlocal tabstop=4 shiftwidth=4 expandtab | ||
| 69 | |||
| 70 | " Python specific settings | ||
| 71 | autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab | ||
| 72 | |||
| 73 | " JavaScript/TypeScript settings | ||
| 74 | autocmd FileType javascript,typescript setlocal tabstop=2 shiftwidth=2 expandtab | ||
| 75 | |||
| 76 | " YAML settings | ||
| 77 | autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 expandtab \ No newline at end of file | ||
