Spaces:
Sleeping
Sleeping
Fix permissions and remove model lfs
Browse files- Dockerfile +8 -2
- test.ipynb +0 -67
- vigostral-7b-chat.Q6_K.gguf +0 -3
Dockerfile
CHANGED
@@ -9,7 +9,13 @@ COPY ./requirements.txt /code/requirements.txt
|
|
9 |
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
9 |
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
+
RUN useradd -m -u 1000 user
|
13 |
+
USER user
|
14 |
+
ENV HOME=/home/user \
|
15 |
+
PATH=/home/user/.local/bin:$PATH
|
16 |
+
|
17 |
+
WORKDIR $HOME/app
|
18 |
+
|
19 |
+
COPY --chown=user ./main.py $HOME/app/main.py
|
20 |
|
21 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
test.ipynb
DELETED
@@ -1,67 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"cells": [
|
3 |
-
{
|
4 |
-
"cell_type": "code",
|
5 |
-
"execution_count": 1,
|
6 |
-
"metadata": {},
|
7 |
-
"outputs": [
|
8 |
-
{
|
9 |
-
"name": "stderr",
|
10 |
-
"output_type": "stream",
|
11 |
-
"text": [
|
12 |
-
"/home/ilhooq/Dev/Python/IA/vigostral-chat/.venv/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
|
13 |
-
" from .autonotebook import tqdm as notebook_tqdm\n"
|
14 |
-
]
|
15 |
-
}
|
16 |
-
],
|
17 |
-
"source": [
|
18 |
-
"from ctransformers import AutoModelForCausalLM\n",
|
19 |
-
"\n",
|
20 |
-
"#Model loading\n",
|
21 |
-
"llm = AutoModelForCausalLM.from_pretrained(\"/home/ilhooq/Stockage/IA-models/vigostral-7b-chat.Q6_K.gguf\",\n",
|
22 |
-
" model_type='mistral',\n",
|
23 |
-
" max_new_tokens = 1096,\n",
|
24 |
-
" threads = 3,\n",
|
25 |
-
")"
|
26 |
-
]
|
27 |
-
},
|
28 |
-
{
|
29 |
-
"cell_type": "code",
|
30 |
-
"execution_count": 3,
|
31 |
-
"metadata": {},
|
32 |
-
"outputs": [
|
33 |
-
{
|
34 |
-
"name": "stdout",
|
35 |
-
"output_type": "stream",
|
36 |
-
"text": [
|
37 |
-
"llama\n"
|
38 |
-
]
|
39 |
-
}
|
40 |
-
],
|
41 |
-
"source": [
|
42 |
-
"print(llm.model_type)"
|
43 |
-
]
|
44 |
-
}
|
45 |
-
],
|
46 |
-
"metadata": {
|
47 |
-
"kernelspec": {
|
48 |
-
"display_name": ".venv",
|
49 |
-
"language": "python",
|
50 |
-
"name": "python3"
|
51 |
-
},
|
52 |
-
"language_info": {
|
53 |
-
"codemirror_mode": {
|
54 |
-
"name": "ipython",
|
55 |
-
"version": 3
|
56 |
-
},
|
57 |
-
"file_extension": ".py",
|
58 |
-
"mimetype": "text/x-python",
|
59 |
-
"name": "python",
|
60 |
-
"nbconvert_exporter": "python",
|
61 |
-
"pygments_lexer": "ipython3",
|
62 |
-
"version": "3.12.3"
|
63 |
-
}
|
64 |
-
},
|
65 |
-
"nbformat": 4,
|
66 |
-
"nbformat_minor": 2
|
67 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vigostral-7b-chat.Q6_K.gguf
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:5875bf82a1a2fa9c8fce388a60293e19f0265087bd5ffe5ae1b2a1ef2ff7d439
|
3 |
-
size 5942064768
|
|
|
|
|
|
|
|