Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -4
Dockerfile
CHANGED
|
@@ -1,13 +1,18 @@
|
|
| 1 |
FROM python:3.12
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
|
| 9 |
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
| 10 |
RUN pip install --no-cache-dir -r models/transformer/requirements.txt
|
| 11 |
RUN pip install --no-cache-dir -r models/seq2seq/requirements.txt
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.12
|
| 2 |
|
| 3 |
+
RUN useradd -m -u 1000 user
|
| 4 |
+
USER user
|
| 5 |
+
ENV HOME=/home/user \
|
| 6 |
+
PATH=/home/user/.local/bin:$PATH
|
| 7 |
|
| 8 |
+
WORKDIR $HOME/app
|
| 9 |
|
| 10 |
+
COPY --chown=user . $HOME/app
|
| 11 |
|
| 12 |
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
| 13 |
RUN pip install --no-cache-dir -r models/transformer/requirements.txt
|
| 14 |
RUN pip install --no-cache-dir -r models/seq2seq/requirements.txt
|
| 15 |
|
| 16 |
+
EXPOSE 7860
|
| 17 |
+
|
| 18 |
+
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|