Surbhi
commited on
Commit
·
4b43ab9
1
Parent(s):
1da595e
Fix Docker file
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
-
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
| 2 |
-
# you will also find guides on how best to write your Dockerfile
|
| 3 |
-
|
| 4 |
FROM python:3.10
|
| 5 |
|
| 6 |
RUN useradd -m -u 1000 user
|
| 7 |
|
| 8 |
WORKDIR /app
|
| 9 |
|
|
|
|
| 10 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 11 |
-
|
| 12 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
RUN git clone https://github.com/huggingface/transformers
|
| 17 |
RUN cd transformers && pip install .
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
CMD ["uvicorn", "index:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
RUN useradd -m -u 1000 user
|
| 4 |
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install system dependencies and any Python requirements
|
| 8 |
COPY --chown=user ./requirements.txt requirements.txt
|
|
|
|
| 9 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 10 |
|
| 11 |
+
# Clone transformers repo and install it
|
|
|
|
| 12 |
RUN git clone https://github.com/huggingface/transformers
|
| 13 |
RUN cd transformers && pip install .
|
| 14 |
|
| 15 |
+
# Now copy the rest of your application
|
| 16 |
+
COPY --chown=user . /app
|
| 17 |
+
|
| 18 |
+
# Set the correct entrypoint
|
| 19 |
CMD ["uvicorn", "index:app", "--host", "0.0.0.0", "--port", "7860"]
|