nouamanetazi HF staff commited on
Commit
5347fea
·
1 Parent(s): 9617a80

dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
5
+
6
+ FROM python:3.9
7
+
8
+ # download file
9
+ # RUN wget -O ./models/7B/gpt-j-ggml-model-q4_0.bin https://huggingface.co/ocordeiro/ggml-gpt-j-6b-q4_0/resolve/main/gpt-j-ggml-model-q4_0.bin
10
+
11
+
12
+ # FROM ghcr.io/ggerganov/llama.cpp:light
13
+
14
+ # WORKDIR /code
15
+ # COPY ./requirements.txt /code/requirements.txt
16
+ # RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
17
+ # COPY . .
18
+
19
+ # mount ./models/7B
20
+
21
+
22
+ RUN mkdir -p ./models/7B
23
+ RUN wget -O ./models/7B/gpt-j-ggml-model-q4_0.bin https://huggingface.co/ocordeiro/ggml-gpt-j-6b-q4_0/resolve/main/gpt-j-ggml-model-q4_0.bin
24
+ # RUN curl -L https://huggingface.co/ocordeiro/ggml-gpt-j-6b-q4_0/resolve/main/gpt-j-ggml-model-q4_0.bin --output /models/7B/gpt-j-ggml-model-q4_0.bin
25
+ # RUN python3 -c "import urllib.request; urllib.request.urlretrieve('https://huggingface.co/ocordeiro/ggml-gpt-j-6b-q4_0/resolve/main/gpt-j-ggml-model-q4_0.bin', '/models/7B/gpt-j-ggml-model-q4_0.bin')"
26
+
27
+ CMD ["-m", "./models/7B/gpt-j-ggml-model-q4_0.bin", "-p", "Building a website can be done in 10 simple steps:", "-n", "512"]
28
+
29
+ # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]