Update Dockerfile
Browse files- Dockerfile +9 -14
Dockerfile
CHANGED
@@ -1,18 +1,13 @@
|
|
1 |
-
|
2 |
-
FROM python:3.9-slim
|
3 |
|
4 |
-
|
5 |
-
WORKDIR /app
|
6 |
|
7 |
-
|
8 |
-
COPY . /app
|
9 |
|
10 |
-
|
11 |
-
RUN
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
# Command to run the app
|
17 |
-
#CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|
18 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--loop", "asyncio"]
|
|
|
1 |
+
FROM python:3.10
|
|
|
2 |
|
3 |
+
WORKDIR /code
|
|
|
4 |
|
5 |
+
COPY --link --chown=1000 . .
|
|
|
6 |
|
7 |
+
RUN mkdir -p /tmp/cache/
|
8 |
+
RUN chmod a+rwx -R /tmp/cache/
|
9 |
+
ENV HF_HUB_CACHE=HF_HOME
|
10 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
+
ENV PYTHONUNBUFFERED=1 PORT=7860
|
13 |
+
CMD ["python", "app.py"]
|
|
|
|
|
|
|
|