dkdaniz commited on
Commit
6a1e76c
1 Parent(s): c00f459

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -19
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
  # syntax=docker/dockerfile:1
2
  # Build as `docker build . -t localgpt`, requires BuildKit.
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:11.7.1-runtime-ubuntu22.04
5
 
6
  ENV HOST 0.0.0.0
7
 
@@ -26,23 +26,14 @@ RUN python -m pip install --upgrade pip pytest cmake \
26
  scikit-build setuptools fastapi uvicorn sse-starlette \
27
  pydantic-settings starlette-context gradio huggingface_hub hf_transfer
28
 
29
- RUN useradd -m -u 1000 user
30
- # Switch to the "user" user
31
- USER user
32
- # Set home to the user's home directory
33
- ENV HOME=/home/user \
34
- PATH=/home/user/.local/bin:$PATH \
35
- PYTHONPATH=$HOME/app \
36
- PYTHONUNBUFFERED=1 \
37
- GRADIO_ALLOW_FLAGGING=never \
38
- GRADIO_NUM_PORTS=1 \
39
- GRADIO_SERVER_NAME=0.0.0.0 \
40
- GRADIO_THEME=huggingface \
41
- SYSTEM=spaces
42
-
43
- WORKDIR $HOME/app
44
-
45
- # Copy the current directory contents into the container at $HOME/app setting the owner to the user
46
- COPY --chown=user . $HOME/app
47
 
48
  CMD sh -c "chmod -R 777 -c ./run.sh && ./run.sh"
 
1
  # syntax=docker/dockerfile:1
2
  # Build as `docker build . -t localgpt`, requires BuildKit.
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
  ENV HOST 0.0.0.0
7
 
 
26
  scikit-build setuptools fastapi uvicorn sse-starlette \
27
  pydantic-settings starlette-context gradio huggingface_hub hf_transfer
28
 
29
+ # ENV HOME=/home/user \
30
+ # PATH=/home/user/.local/bin:$PATH \
31
+ # PYTHONPATH=$HOME/app \
32
+ # PYTHONUNBUFFERED=1 \
33
+ # GRADIO_ALLOW_FLAGGING=never \
34
+ # GRADIO_NUM_PORTS=1 \
35
+ # GRADIO_SERVER_NAME=0.0.0.0 \
36
+ # GRADIO_THEME=huggingface \
37
+ # SYSTEM=spaces
 
 
 
 
 
 
 
 
 
38
 
39
  CMD sh -c "chmod -R 777 -c ./run.sh && ./run.sh"