Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official PyTorch image with CUDA support
|
| 2 |
+
FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime
|
| 3 |
+
|
| 4 |
+
# Install git to clone the model repository
|
| 5 |
+
RUN apt-get update && apt-get install -y git
|
| 6 |
+
|
| 7 |
+
# Install other dependencies
|
| 8 |
+
RUN pip install transformers
|
| 9 |
+
|
| 10 |
+
# Clone the unsloth/llama-3-8b-bnb-4bit model repository
|
| 11 |
+
RUN git clone https://huggingface.co/unsloth/llama-3-8b-bnb-4bit
|
| 12 |
+
|
| 13 |
+
# Set the working directory to the model directory
|
| 14 |
+
WORKDIR /unsloth/llama-3-8b-bnb-4bit
|
| 15 |
+
|
| 16 |
+
# Copy the inference script
|
| 17 |
+
COPY inference.py .
|
| 18 |
+
|
| 19 |
+
# Run the inference script
|
| 20 |
+
CMD ["python", "inference.py"]
|