Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +2 -17
Dockerfile
CHANGED
|
@@ -1,25 +1,10 @@
|
|
| 1 |
-
|
| 2 |
-
FROM ubuntu:22.04
|
| 3 |
|
| 4 |
-
# Set non-interactive mode (prevents prompts)
|
| 5 |
-
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
-
|
| 7 |
-
# Install system dependencies (Fixes GLIBCXX issue)
|
| 8 |
-
RUN apt update && apt install -y libstdc++6 python3 python3-pip
|
| 9 |
-
|
| 10 |
-
# ✅ Set cache directory for Hugging Face (Fixes Permission Errors)
|
| 11 |
-
ENV HF_HOME=/tmp/cache
|
| 12 |
-
RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME
|
| 13 |
-
|
| 14 |
-
# Set working directory inside the container
|
| 15 |
WORKDIR /app
|
| 16 |
|
| 17 |
-
# Copy requirements.txt and install Python dependencies
|
| 18 |
COPY requirements.txt .
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
-
# Copy application files
|
| 22 |
COPY app.py .
|
| 23 |
|
| 24 |
-
|
| 25 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
FROM python:3.9
|
|
|
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
|
|
|
| 8 |
COPY app.py .
|
| 9 |
|
| 10 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|