Commit ·
3f7f0b6
1
Parent(s): bbbd9d2
Corrected Dockerfile paths for root deployment
Browse files- Dockerfile +9 -12
Dockerfile
CHANGED
|
@@ -1,23 +1,20 @@
|
|
| 1 |
-
# Use a Python base image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install system dependencies
|
| 8 |
-
RUN apt-get update && apt-get install -y build-essential
|
| 9 |
|
| 10 |
-
# Copy
|
| 11 |
-
COPY
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
-
# Copy
|
| 15 |
-
COPY
|
| 16 |
|
| 17 |
-
#
|
| 18 |
ENV PORT=7860
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
ENV PYTHONUNBUFFERED=1
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies
|
| 6 |
+
RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
+
# Copy requirements from the ROOT of your project
|
| 9 |
+
COPY requirements.txt .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
+
# Copy everything else from the current folder (main.py, Database, etc.)
|
| 13 |
+
COPY . .
|
| 14 |
|
| 15 |
+
# Hugging Face defaults to 7860
|
| 16 |
ENV PORT=7860
|
| 17 |
EXPOSE 7860
|
| 18 |
|
| 19 |
+
# Ensure the command points to the main script
|
| 20 |
+
CMD ["python", "main.py"]
|
|
|