diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1744b82 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +Dockerfile +docker-compose.yml +.env + diff --git a/.env_example b/.env_example new file mode 100644 index 0000000..7f64f62 --- /dev/null +++ b/.env_example @@ -0,0 +1 @@ +HF_TOKEN=hf_1234567890 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..30bd623 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.env + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f8b12f3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM mosaicml/llm-foundry:2.2.1_cu121_flash2-latest + +ENV PYTHONUNBUFFERED 1 + +WORKDIR /usr/src/app + +COPY requirements-gpu.txt ./ +RUN pip install --no-cache-dir -r requirements-gpu.txt + +COPY . . diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..97c7836 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,26 @@ +--- +version: "3.8" +services: + + dbrx: + build: + context: . + restart: on-failure + env_file: + - .env + environment: + - HF_HOME=/huggingface + command: python generate.py + volumes: + - huggingface:/huggingface + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ['all'] + capabilities: [gpu] + +volumes: + huggingface: +