Spaces:
Runtime error
Runtime error
tracinginsights
commited on
Commit
•
575d525
1
Parent(s):
eecdf06
Update Dockerfile
Browse files- Dockerfile +4 -7
Dockerfile
CHANGED
@@ -16,19 +16,16 @@ FROM python:3.10.9
|
|
16 |
|
17 |
WORKDIR /code
|
18 |
|
19 |
-
RUN apt-get update && apt-get install -y python3-venv
|
20 |
-
|
21 |
-
RUN python3 -m venv /venv
|
22 |
-
|
23 |
-
ENV PATH="/venv/bin:$PATH"
|
24 |
-
|
25 |
RUN mkdir /code/cache
|
26 |
|
27 |
COPY ./requirements.txt /code/requirements.txt
|
28 |
|
29 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
30 |
|
|
|
|
|
31 |
COPY . .
|
32 |
|
33 |
-
CMD ["
|
|
|
34 |
|
|
|
16 |
|
17 |
WORKDIR /code
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
RUN mkdir /code/cache
|
20 |
|
21 |
COPY ./requirements.txt /code/requirements.txt
|
22 |
|
23 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
24 |
|
25 |
+
ENV FASTF1_CACHE_DIR="/home/user/fastf1-cache"
|
26 |
+
|
27 |
COPY . .
|
28 |
|
29 |
+
CMD ["sh", "-c", "mkdir -p $FASTF1_CACHE_DIR && chown -R $USER:$USER $FASTF1_CACHE_DIR && exec uvicorn main:app --host 0.0.0.0 --port 7860"]
|
30 |
+
|
31 |
|