Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
@@ -2,8 +2,14 @@ FROM python:3.10
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
|
|
|
|
|
|
|
|
5 |
COPY . .
|
6 |
|
|
|
7 |
RUN pip install --no-cache-dir -r requirements.txt
|
8 |
|
|
|
9 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# Create a safe local cache directory for models
|
6 |
+
RUN mkdir -p /app/cache
|
7 |
+
|
8 |
+
# Copy all code files
|
9 |
COPY . .
|
10 |
|
11 |
+
# Install dependencies
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
+
# Run the FastAPI app using uvicorn
|
15 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|