Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
FROM python:3.9
|
2 |
-
|
|
|
|
|
3 |
WORKDIR /code
|
4 |
|
5 |
RUN pip install fastapi requests libretranslate uvicorn[standard]==0.17.*
|
6 |
|
7 |
COPY . .
|
8 |
-
|
9 |
# Start both the FastAPI app and the auxiliary process in parallel
|
10 |
CMD ["bash", "-c", "uvicorn app:app --host 0.0.0.0 --port 7860 & python main.py --load-only hi,en"]
|
|
|
1 |
FROM python:3.9
|
2 |
+
RUN useradd -m -u 1000 user
|
3 |
+
USER user
|
4 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
5 |
WORKDIR /code
|
6 |
|
7 |
RUN pip install fastapi requests libretranslate uvicorn[standard]==0.17.*
|
8 |
|
9 |
COPY . .
|
10 |
+
COPY --chown=user . /app
|
11 |
# Start both the FastAPI app and the auxiliary process in parallel
|
12 |
CMD ["bash", "-c", "uvicorn app:app --host 0.0.0.0 --port 7860 & python main.py --load-only hi,en"]
|