hackergeek98 commited on
Commit
e007d29
·
verified ·
1 Parent(s): 6553953

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -5
Dockerfile CHANGED
@@ -1,6 +1,25 @@
1
- FROM huggingface/autotrain-advanced:latest
2
- CMD pip uninstall -y autotrain-advanced && pip install -U autotrain-advanced && autotrain app --host 0.0.0.0 --port 7860 --workers 1
3
- CMD pip install datasets
4
- from datasets import load_dataset
5
 
6
- ds = load_dataset("lavita/medical-qa-datasets", "all-processed")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"]