Spaces:
Running
on
T4
Running
on
T4
dockerfile
Browse files- Dockerfile +7 -9
Dockerfile
CHANGED
@@ -1,21 +1,19 @@
|
|
1 |
-
# Use lightweight Python image
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
-
# Install system dependencies
|
5 |
RUN apt-get update && apt-get install -y git && apt-get clean
|
6 |
|
7 |
-
# Set working directory
|
8 |
-
WORKDIR /
|
9 |
|
10 |
-
#
|
11 |
COPY requirements.txt .
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
-
# Copy the
|
15 |
COPY . .
|
16 |
|
17 |
-
# Expose
|
18 |
EXPOSE 7860
|
19 |
|
20 |
-
#
|
21 |
-
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
|
|
3 |
RUN apt-get update && apt-get install -y git && apt-get clean
|
4 |
|
5 |
+
# Set working directory to root of copied repo
|
6 |
+
WORKDIR /
|
7 |
|
8 |
+
# Install dependencies
|
9 |
COPY requirements.txt .
|
10 |
RUN pip install --no-cache-dir -r requirements.txt
|
11 |
|
12 |
+
# Copy everything from the repo root into the container root
|
13 |
COPY . .
|
14 |
|
15 |
+
# Expose port for Hugging Face
|
16 |
EXPOSE 7860
|
17 |
|
18 |
+
# ✅ Launch server.py's FastAPI app
|
19 |
+
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|