Daniel Marques commited on
Commit
abb8521
1 Parent(s): 0b74b4d

fix: add websocket in handlerToken

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -14
  2. run.sh +1 -1
Dockerfile CHANGED
@@ -3,7 +3,6 @@
3
  # Run as `docker run -it --mount src="$HOME/.cache",target=/root/.cache,type=bind --gpus=all localgpt`, requires Nvidia container toolkit.
4
  FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
5
 
6
-
7
  RUN apt-get update && apt-get upgrade -y \
8
  && apt-get install -y git build-essential libpq-dev gcc \
9
  wget ocl-icd-opencl-dev opencl-headers clinfo \
@@ -11,16 +10,11 @@ RUN apt-get update && apt-get upgrade -y \
11
  g++-11 make python3 python-is-python3 pip redis \
12
  && mkdir -p /etc/OpenCL/vendors && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
13
 
14
- WORKDIR /app
15
-
16
- RUN mkdir "./cache"
17
-
18
  COPY . .
19
 
20
  # setting build related env vars
21
  ENV CUDA_DOCKER_ARCH=all
22
  ENV LLAMA_CUBLAS=1
23
- ENV TRANSFORMERS_CACHE="./cache"
24
 
25
  # Install depencencies
26
  RUN python -m pip install --upgrade pip pytest cmake \
@@ -31,16 +25,12 @@ RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
31
  RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 PIP_ROOT_USER_ACTION=ignore pip install --ignore-installed --timeout 100 -r requirements.txt
32
  RUN pip install uvicorn
33
 
 
 
34
 
 
35
 
36
-
37
-
38
- # RUN useradd -m -u 1000 user
39
- # USER user
40
-
41
- # WORKDIR $HOME/app
42
-
43
- # COPY --chown=user . $HOME/app
44
 
45
  RUN chmod +x ./run.sh
46
 
 
3
  # Run as `docker run -it --mount src="$HOME/.cache",target=/root/.cache,type=bind --gpus=all localgpt`, requires Nvidia container toolkit.
4
  FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
5
 
 
6
  RUN apt-get update && apt-get upgrade -y \
7
  && apt-get install -y git build-essential libpq-dev gcc \
8
  wget ocl-icd-opencl-dev opencl-headers clinfo \
 
10
  g++-11 make python3 python-is-python3 pip redis \
11
  && mkdir -p /etc/OpenCL/vendors && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
12
 
 
 
 
 
13
  COPY . .
14
 
15
  # setting build related env vars
16
  ENV CUDA_DOCKER_ARCH=all
17
  ENV LLAMA_CUBLAS=1
 
18
 
19
  # Install depencencies
20
  RUN python -m pip install --upgrade pip pytest cmake \
 
25
  RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 PIP_ROOT_USER_ACTION=ignore pip install --ignore-installed --timeout 100 -r requirements.txt
26
  RUN pip install uvicorn
27
 
28
+ RUN useradd -m -u 1000 user
29
+ USER user
30
 
31
+ WORKDIR $HOME/app
32
 
33
+ COPY --chown=user . $HOME/app
 
 
 
 
 
 
 
34
 
35
  RUN chmod +x ./run.sh
36
 
run.sh CHANGED
@@ -1,5 +1,5 @@
1
  redis-cli --version
2
 
3
- service redis-server start
4
 
5
  uvicorn "main:app" --port 7860 --host 0.0.0.0
 
1
  redis-cli --version
2
 
3
+ nohup redis-server &
4
 
5
  uvicorn "main:app" --port 7860 --host 0.0.0.0