Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +24 -5
Dockerfile
CHANGED
|
@@ -1,6 +1,25 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
CMD pip install datasets
|
| 4 |
-
from datasets import load_dataset
|
| 5 |
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use a base image with CUDA support (if GPU is available)
|
| 2 |
+
FROM nvidia/cuda:12.1.1-base-ubuntu22.04
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
# Install Python and system dependencies
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
| 6 |
+
python3.10 \
|
| 7 |
+
python3-pip \
|
| 8 |
+
git \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
+
# Set working directory
|
| 12 |
+
WORKDIR /app
|
| 13 |
+
|
| 14 |
+
# Install Python dependencies
|
| 15 |
+
COPY requirements.txt .
|
| 16 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
+
|
| 18 |
+
# Copy code
|
| 19 |
+
COPY . .
|
| 20 |
+
|
| 21 |
+
# Set Hugging Face token (replace with your token)
|
| 22 |
+
ENV HF_TOKEN="your_hf_token_here"
|
| 23 |
+
|
| 24 |
+
# Run training on container start
|
| 25 |
+
CMD ["python3", "app.py"]
|