Spaces:
Sleeping
Sleeping
minor
Browse files- Dockerfile +5 -8
Dockerfile
CHANGED
|
@@ -18,6 +18,9 @@ ENV PATH="/opt/venv/bin:$PATH"
|
|
| 18 |
|
| 19 |
# Install Python dependencies first (for better caching)
|
| 20 |
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
| 21 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 22 |
|
| 23 |
# Install PyTorch with CUDA support
|
|
@@ -26,15 +29,9 @@ RUN pip install --no-cache-dir \
|
|
| 26 |
torchvision==0.16.2+cu121 \
|
| 27 |
--extra-index-url https://download.pytorch.org/whl/cu121
|
| 28 |
|
| 29 |
-
# Copy entire application (including model.py)
|
| 30 |
-
COPY . .
|
| 31 |
-
|
| 32 |
-
# Install your package in development mode
|
| 33 |
-
RUN pip install -e .
|
| 34 |
-
|
| 35 |
# Set up Hugging Face authentication (use a build ARG for the token)
|
| 36 |
-
ARG HF_TOKEN
|
| 37 |
-
RUN python3 -c "from huggingface_hub import login; login(token='$HF_TOKEN')"
|
| 38 |
|
| 39 |
# Test model loading (use absolute import path)
|
| 40 |
RUN python3 -c "from qwen_classifier.model import QwenClassifier; \
|
|
|
|
| 18 |
|
| 19 |
# Install Python dependencies first (for better caching)
|
| 20 |
COPY requirements.txt .
|
| 21 |
+
COPY app.py .
|
| 22 |
+
COPY qwen_classifier/ ./qwen_classifier/
|
| 23 |
+
COPY setup.py .
|
| 24 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
|
| 26 |
# Install PyTorch with CUDA support
|
|
|
|
| 29 |
torchvision==0.16.2+cu121 \
|
| 30 |
--extra-index-url https://download.pytorch.org/whl/cu121
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
# Set up Hugging Face authentication (use a build ARG for the token)
|
| 33 |
+
# ARG HF_TOKEN
|
| 34 |
+
# RUN python3 -c "from huggingface_hub import login; login(token='$HF_TOKEN')"
|
| 35 |
|
| 36 |
# Test model loading (use absolute import path)
|
| 37 |
RUN python3 -c "from qwen_classifier.model import QwenClassifier; \
|