Spaces:
Running
Running
changed to 7860
Browse files- Dockerfile +2 -60
Dockerfile
CHANGED
@@ -1,61 +1,3 @@
|
|
1 |
-
# # Use official Python image with a more recent version
|
2 |
-
# FROM python:3.11-slim
|
3 |
-
|
4 |
-
# # Set working directory
|
5 |
-
# WORKDIR /app
|
6 |
-
|
7 |
-
# # Install system dependencies
|
8 |
-
# RUN apt-get update && apt-get install -y \
|
9 |
-
# gcc \
|
10 |
-
# && rm -rf /var/lib/apt/lists/*
|
11 |
-
|
12 |
-
# # Copy requirements from backend and install
|
13 |
-
# COPY backend/requirements.txt .
|
14 |
-
|
15 |
-
# # Upgrade pip to latest version to resolve dependency conflicts better
|
16 |
-
# RUN pip install --upgrade pip
|
17 |
-
|
18 |
-
# # Install Python dependencies
|
19 |
-
# RUN pip install --no-cache-dir -r requirements.txt
|
20 |
-
|
21 |
-
# # Copy the backend code
|
22 |
-
# COPY backend/ .
|
23 |
-
|
24 |
-
# # Expose the port your FastAPI app runs on
|
25 |
-
# EXPOSE 7860
|
26 |
-
|
27 |
-
# # Command to run the FastAPI app
|
28 |
-
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
29 |
-
|
30 |
-
# # Use official Python image with a more recent version
|
31 |
-
# FROM python:3.11-slim
|
32 |
-
|
33 |
-
# # Set working directory
|
34 |
-
# WORKDIR /app
|
35 |
-
|
36 |
-
# # Install system dependencies
|
37 |
-
# RUN apt-get update && apt-get install -y \
|
38 |
-
# gcc \
|
39 |
-
# && rm -rf /var/lib/apt/lists/*
|
40 |
-
|
41 |
-
# # Copy requirements from backend and install
|
42 |
-
# COPY backend/requirements.txt .
|
43 |
-
|
44 |
-
# # Upgrade pip to latest version to resolve dependency conflicts better
|
45 |
-
# RUN pip install --upgrade pip
|
46 |
-
|
47 |
-
# # Install Python dependencies
|
48 |
-
# RUN pip install --no-cache-dir -r requirements.txt
|
49 |
-
|
50 |
-
# # Copy the backend code
|
51 |
-
# COPY backend/ .
|
52 |
-
|
53 |
-
# # Expose the port your FastAPI app runs on
|
54 |
-
# EXPOSE 8000
|
55 |
-
|
56 |
-
# # Command to run the FastAPI app
|
57 |
-
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
58 |
-
|
59 |
|
60 |
# Use a lightweight Python image
|
61 |
FROM python:3.11-slim
|
@@ -83,7 +25,7 @@ COPY database/ ./database/
|
|
83 |
# COPY .env .env
|
84 |
|
85 |
# Expose the FastAPI port
|
86 |
-
EXPOSE
|
87 |
|
88 |
# Start the FastAPI app
|
89 |
-
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
2 |
# Use a lightweight Python image
|
3 |
FROM python:3.11-slim
|
|
|
25 |
# COPY .env .env
|
26 |
|
27 |
# Expose the FastAPI port
|
28 |
+
EXPOSE 7860
|
29 |
|
30 |
# Start the FastAPI app
|
31 |
+
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
|