Spaces:
Runtime error
Runtime error
Update Dockerfile
#1
by
jjmandog
- opened
- Dockerfile +15 -4
Dockerfile
CHANGED
@@ -1,11 +1,22 @@
|
|
1 |
FROM python:3.9
|
2 |
WORKDIR /code
|
3 |
COPY ./requirements.txt /code/requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
5 |
-
|
6 |
-
|
7 |
RUN git clone https://huggingface.co/sentence-transformers/quora-distilbert-multilingual model
|
|
|
8 |
COPY . .
|
9 |
ENV PYTHONPATH "${PYTHONPATH}:/code/app/"
|
10 |
-
|
11 |
-
|
|
|
|
1 |
FROM python:3.9
|
2 |
WORKDIR /code
|
3 |
COPY ./requirements.txt /code/requirements.txt
|
4 |
+
|
5 |
+
# Install system dependencies
|
6 |
+
RUN apt-get update && \
|
7 |
+
apt-get install -y curl && \
|
8 |
+
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
|
9 |
+
apt-get install git-lfs && \
|
10 |
+
git lfs install
|
11 |
+
|
12 |
+
# Install Python dependencies
|
13 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
14 |
+
|
15 |
+
# Download model
|
16 |
RUN git clone https://huggingface.co/sentence-transformers/quora-distilbert-multilingual model
|
17 |
+
|
18 |
COPY . .
|
19 |
ENV PYTHONPATH "${PYTHONPATH}:/code/app/"
|
20 |
+
|
21 |
+
# Use Uvicorn for async SSE support with Gradio
|
22 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
|