Damien Benveniste commited on
Commit
6cb9d62
·
1 Parent(s): e89ed1a
Files changed (1) hide show
  1. Dockerfile +47 -49
Dockerfile CHANGED
@@ -1,64 +1,62 @@
1
- # Use the official vLLM image as the base image
2
- FROM vllm/vllm-openai:latest
3
-
4
- # Install debugging tools
5
- RUN apt-get update && apt-get install -y procps vim
6
-
7
- # Set environment variables
8
- ENV HUGGING_FACE_HUB_TOKEN="your_hf_token_here"
9
- ENV HF_HOME="/tmp/huggingface"
10
- ENV XDG_CACHE_HOME="/tmp/cache"
11
- ENV NUMBA_CACHE_DIR="/tmp/numba_cache"
12
- ENV OUTLINES_CACHE_DIR="/tmp/outlines_cache"
13
- ENV XDG_CONFIG_HOME="/.config"
14
- ENV VLLM_USE_MODELSCOPE="false"
15
- ENV VLLM_DISABLE_USAGE_STATS="true"
16
-
17
- # Ensure PATH includes common Python locations
18
- ENV PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH"
19
-
20
- # Set the working directory
21
- WORKDIR /app
22
 
23
- # Copy your entrypoint script
24
- COPY entrypoint.sh /app/entrypoint.sh
25
- RUN chmod +x /app/entrypoint.sh
26
 
27
- # Expose the port the app runs on
28
- EXPOSE 8000
29
 
30
- # Set the entrypoint
31
  # ENTRYPOINT ["/app/entrypoint.sh"]
32
- COPY test_server.py /app/test_server.py
33
- CMD ["python", "/app/test_server.py"]
34
 
35
- # FROM python:3.9
36
 
37
- # # Create a non-root user
38
- # RUN useradd -m -u 1000 user
39
 
40
- # # Set the working directory in the container
41
- # WORKDIR /app
42
 
43
- # # Install vLLM
44
- # RUN pip install --no-cache-dir vllm
45
 
46
- # # Copy the entrypoint script
47
- # COPY entrypoint.sh /app/entrypoint.sh
48
 
49
- # # Change ownership of the working directory and entrypoint script to the non-root user
50
- # RUN chown -R user:user /app
51
 
52
- # # Change permissions of the entrypoint script
53
- # RUN chmod +x /app/entrypoint.sh
54
 
55
- # # Switch to the non-root user
56
- # USER user
57
 
58
- # # Set the PATH for the non-root user
59
- # ENV PATH="/home/user/.local/bin:$PATH"
60
 
61
- # EXPOSE 8000
62
 
63
- # # Set the entrypoint
64
- # ENTRYPOINT ["/app/entrypoint.sh"]
 
1
+ # # Use the official vLLM image as the base image
2
+ # FROM vllm/vllm-openai:latest
3
+
4
+ # # Install debugging tools
5
+ # RUN apt-get update && apt-get install -y procps vim
6
+
7
+ # # Set environment variables
8
+ # ENV HUGGING_FACE_HUB_TOKEN="your_hf_token_here"
9
+ # ENV HF_HOME="/tmp/huggingface"
10
+ # ENV XDG_CACHE_HOME="/tmp/cache"
11
+ # ENV NUMBA_CACHE_DIR="/tmp/numba_cache"
12
+ # ENV OUTLINES_CACHE_DIR="/tmp/outlines_cache"
13
+ # ENV XDG_CONFIG_HOME="/.config"
14
+ # ENV VLLM_USE_MODELSCOPE="false"
15
+ # ENV VLLM_DISABLE_USAGE_STATS="true"
16
+
17
+ # # Ensure PATH includes common Python locations
18
+ # ENV PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH"
19
+
20
+ # # Set the working directory
21
+ # WORKDIR /app
22
 
23
+ # # Copy your entrypoint script
24
+ # COPY entrypoint.sh /app/entrypoint.sh
25
+ # RUN chmod +x /app/entrypoint.sh
26
 
27
+ # # Expose the port the app runs on
28
+ # EXPOSE 8000
29
 
30
+ # # Set the entrypoint
31
  # ENTRYPOINT ["/app/entrypoint.sh"]
 
 
32
 
33
+ FROM vllm/vllm-openai:latest
34
 
35
+ # Create a non-root user
36
+ RUN useradd -m -u 1000 user
37
 
38
+ # Set the working directory in the container
39
+ WORKDIR /app
40
 
41
+ # Install vLLM
42
+ RUN pip install --no-cache-dir vllm
43
 
44
+ # Copy the entrypoint script
45
+ COPY entrypoint.sh /app/entrypoint.sh
46
 
47
+ # Change ownership of the working directory and entrypoint script to the non-root user
48
+ RUN chown -R user:user /app
49
 
50
+ # Change permissions of the entrypoint script
51
+ RUN chmod +x /app/entrypoint.sh
52
 
53
+ # Switch to the non-root user
54
+ USER user
55
 
56
+ # Set the PATH for the non-root user
57
+ ENV PATH="/home/user/.local/bin:$PATH"
58
 
59
+ EXPOSE 8000
60
 
61
+ # Set the entrypoint
62
+ ENTRYPOINT ["/app/entrypoint.sh"]