Morgan Funtowicz
commited on
Commit
·
159c6be
1
Parent(s):
6c0e598
test(embeddings): add the proper dockerfile definition for running tests
Browse files- .hfjobs/Dockerfile +20 -1
- .hfjobs/deploy.json +1 -1
.hfjobs/Dockerfile
CHANGED
@@ -1,3 +1,22 @@
|
|
1 |
FROM python/3.12
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM python/3.12
|
2 |
|
3 |
+
ENV ENDPOINT_API_KEY="undefined"
|
4 |
+
ARG ENDPOINT_URL="http://host.docker.internal:8000"
|
5 |
+
ARG ENDPOINT_NUM_SAMPLES=50
|
6 |
+
ARG ENDPOINT_TEST_SEED=31415926
|
7 |
+
|
8 |
+
ENV NUMBA_CACHE_DIR=/tmp/numba
|
9 |
+
ENV HF_HOME=/tmp/huggingface
|
10 |
+
|
11 |
+
ENV ENDPOINT_URL=${ENDPOINT_URL}/api/v1
|
12 |
+
ENV ENDPOINT_NUM_SAMPLES=$ENDPOINT_NUM_SAMPLES
|
13 |
+
ENV ENDPOINT_TEST_SEED=$ENDPOINT_TEST_SEED
|
14 |
+
|
15 |
+
RUN --mount=type=bind,source=.hfjobs/requirements.txt,target=/opt/jobs/requirements.txt \
|
16 |
+
python -m pip install -r /opt/jobs/requirements.txt
|
17 |
+
|
18 |
+
WORKDIR /opt/endpoint
|
19 |
+
COPY tests/ tests/.
|
20 |
+
|
21 |
+
ENTRYPOINT ["pytest"]
|
22 |
+
CMD ["-p", "no:cacheprovider", "--import-mode", "importlib", "tests"]
|
.hfjobs/deploy.json
CHANGED
@@ -2,6 +2,6 @@
|
|
2 |
"id": "deploy-embeddings-intel-cpu",
|
3 |
"description": "Build and deploy Embeddings endpoint",
|
4 |
"instance_type": "intel-spr",
|
5 |
-
"instance_size": "
|
6 |
"model": "sentence-transformers/all-MiniLM-L6-v2"
|
7 |
}
|
|
|
2 |
"id": "deploy-embeddings-intel-cpu",
|
3 |
"description": "Build and deploy Embeddings endpoint",
|
4 |
"instance_type": "intel-spr",
|
5 |
+
"instance_size": "x2",
|
6 |
"model": "sentence-transformers/all-MiniLM-L6-v2"
|
7 |
}
|