Spaces:
Sleeping
Sleeping
Damien Benveniste
commited on
Commit
·
7c6c7b7
1
Parent(s):
6b8f6cc
modified
Browse files- Dockerfile +44 -44
Dockerfile
CHANGED
@@ -1,62 +1,62 @@
|
|
1 |
-
#
|
2 |
-
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
#
|
18 |
-
|
19 |
|
20 |
-
#
|
21 |
-
|
22 |
|
23 |
-
#
|
24 |
-
|
25 |
-
|
26 |
|
27 |
-
#
|
28 |
-
|
29 |
|
30 |
-
#
|
31 |
-
|
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"]
|
|
|
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"]
|