Skip to content

Commit

Permalink
add base
Browse files Browse the repository at this point in the history
  • Loading branch information
reymondzzzz committed Nov 8, 2023
1 parent 20931af commit 9cbbfb1
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/cicl/Dockerfile_base
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y \
curl \
git \
htop \
tmux \
file \
vim \
expect \
mpich \
libmpich-dev \
python3 python3-pip \
&& rm -rf /var/lib/{apt,dpkg,cache,log}

RUN echo "export PATH=/usr/local/cuda/bin:\$PATH" > /etc/profile.d/50-smc.sh
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1

# torch
RUN pip install --no-cache-dir torch==2.0.1 --index-url https://download.pytorch.org/whl/cu118

# linguist requisites
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
expect \
ruby-full \
ruby-bundler \
build-essential \
cmake \
pkg-config \
libicu-dev \
zlib1g-dev \
libcurl4-openssl-dev \
libssl-dev
RUN git clone https://github.com/smallcloudai/linguist.git /tmp/linguist \
&& cd /tmp/linguist \
&& bundle install \
&& rake build_gem
ENV PATH="${PATH}:/tmp/linguist/bin"

RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y python3-packaging

ENV INSTALL_OPTIONAL=TRUE
ENV BUILD_CUDA_EXT=1
ENV GITHUB_ACTIONS=true
ENV TORCH_CUDA_ARCH_LIST="6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0+PTX"
ENV FLASH_ATTENTION_FORCE_BUILD=TRUE
ENV MAX_JOBS=8
COPY . /tmp/app
RUN pip install ninja
RUN pip install -vvv git+https://github.com/smallcloudai/flash-attention@feat/alibi
36 changes: 36 additions & 0 deletions .github/workflows/build_base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build base
on:
pull_request:
workflow_dispatch:

jobs:
build_base:
name: Build base
runs-on: ubuntu-latest
steps:
# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v5
with:
push: false
context: ./.github/cicl
file: ./.github/cicl/Dockerfile_base
tags: smallcloud/refact_base:latest
platforms: |
linux/amd64

0 comments on commit 9cbbfb1

Please sign in to comment.