Spaces:
Sleeping
Sleeping
updated the docker + added NUMBADIR
Browse files- Dockerfile +1 -3
- server.py +1 -0
Dockerfile
CHANGED
@@ -22,13 +22,11 @@ COPY . .
|
|
22 |
# Set the working directory to /
|
23 |
WORKDIR /
|
24 |
|
25 |
-
|
26 |
RUN mkdir -p /uploads
|
27 |
RUN chmod 777 /uploads
|
28 |
|
29 |
-
|
30 |
# Install requirements.txt
|
31 |
-
RUN pip install --upgrade -r /requirements.txt
|
32 |
|
33 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
34 |
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
22 |
# Set the working directory to /
|
23 |
WORKDIR /
|
24 |
|
|
|
25 |
RUN mkdir -p /uploads
|
26 |
RUN chmod 777 /uploads
|
27 |
|
|
|
28 |
# Install requirements.txt
|
29 |
+
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
30 |
|
31 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
32 |
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
server.py
CHANGED
@@ -14,6 +14,7 @@ import glob
|
|
14 |
|
15 |
UPLOAD_DIR = Path() / "uploads"
|
16 |
UPLOAD_DIR.mkdir(parents=True, exist_ok=True)
|
|
|
17 |
|
18 |
app = FastAPI()
|
19 |
|
|
|
14 |
|
15 |
UPLOAD_DIR = Path() / "uploads"
|
16 |
UPLOAD_DIR.mkdir(parents=True, exist_ok=True)
|
17 |
+
os.environ[ 'NUMBA_CACHE_DIR' ] = '/tmp/'
|
18 |
|
19 |
app = FastAPI()
|
20 |
|