Spaces:
Sleeping
Sleeping
Commit
·
1abc28d
1
Parent(s):
ea630f6
backend deploymemt
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
# Use Python 3.11 as the base image
|
| 2 |
-
FROM python:3.11
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
|
@@ -11,7 +13,9 @@ RUN mkdir -p /app/logs && chmod -R 777 /app/logs
|
|
| 11 |
|
| 12 |
# Install dependencies
|
| 13 |
RUN pip install --upgrade pip
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# Set PYTHONPATH so FastAPI can find the 'backend' module
|
| 17 |
ENV PYTHONPATH=/app
|
|
|
|
| 1 |
# Use Python 3.11 as the base image
|
| 2 |
+
# FROM python:3.11
|
| 3 |
+
FROM python:3.11-slim
|
| 4 |
+
|
| 5 |
|
| 6 |
# Set the working directory inside the container
|
| 7 |
WORKDIR /app
|
|
|
|
| 13 |
|
| 14 |
# Install dependencies
|
| 15 |
RUN pip install --upgrade pip
|
| 16 |
+
# Disable cache for pip installs
|
| 17 |
+
RUN pip install --no-cache-dir -r requirement.txt
|
| 18 |
+
|
| 19 |
|
| 20 |
# Set PYTHONPATH so FastAPI can find the 'backend' module
|
| 21 |
ENV PYTHONPATH=/app
|