Damien Benveniste commited on
Commit
23d2d9c
·
1 Parent(s): adf79f3
Files changed (2) hide show
  1. Dockerfile +1 -42
  2. entrypoint.sh +1 -23
Dockerfile CHANGED
@@ -28,45 +28,4 @@ RUN chmod +x /app/entrypoint.sh
28
  EXPOSE 8000
29
 
30
  # Set the entrypoint
31
- ENTRYPOINT ["/app/entrypoint.sh"]
32
-
33
- # FROM python:3.9
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"]
63
-
64
-
65
- # ARG VERSION=v0.5.3.post1
66
- # FROM vllm/vllm-openai:latest
67
- # ENV PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH"
68
- # EXPOSE 8000
69
- # WORKDIR /app
70
- # COPY entrypoint.sh /app/entrypoint.sh
71
- # RUN chmod +x /app/entrypoint.sh
72
- # ENTRYPOINT [ "/app/entrypoint.sh" ]
 
28
  EXPOSE 8000
29
 
30
  # Set the entrypoint
31
+ ENTRYPOINT ["/app/entrypoint.sh"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
entrypoint.sh CHANGED
@@ -2,7 +2,6 @@
2
 
3
  # Default values
4
  MODEL=${MODEL:-"microsoft/Phi-3-mini-4k-instruct"}
5
- # MODEL=${MODEL:-"EleutherAI/pythia-70m"}
6
  DTYPE=${DTYPE:-"half"}
7
  MAX_NUM_BATCHED_TOKENS=${MAX_NUM_BATCHED_TOKENS:-512}
8
  MAX_NUM_SEQS=${MAX_NUM_SEQS:-16}
@@ -13,22 +12,8 @@ ENFORCE_EAGER=${ENFORCE_EAGER:-true}
13
  # Disable usage stats via environment variable
14
  export VLLM_DISABLE_USAGE_STATS=true
15
 
16
- # Print environment for debugging
17
- echo "Environment variables:"
18
- env
19
-
20
- # Create and set permissions for the config directory
21
- CONFIG_DIR=${XDG_CONFIG_HOME:-"/tmp/config"}
22
-
23
- if [ ! -d "$CONFIG_DIR" ]; then
24
- mkdir -p "$CONFIG_DIR"
25
- fi
26
- chmod -R 777 "$CONFIG_DIR"
27
- echo "Permissions for $CONFIG_DIR:"
28
- ls -la "$CONFIG_DIR"
29
-
30
  # Check and set permissions for directories
31
- for dir in /tmp/huggingface /tmp/cache /tmp/numba_cache /tmp/outlines_cache /.config; do
32
  if [ ! -d "$dir" ]; then
33
  mkdir -p "$dir"
34
  fi
@@ -52,13 +37,6 @@ if [ "$ENFORCE_EAGER" = "true" ]; then
52
  CMD="$CMD --enforce-eager"
53
  fi
54
 
55
-
56
- # python3 -m vllm.entrypoints.openai.api_server \
57
- # --model EleutherAI/pythia-70m \
58
- # --gpu-memory-utilization 0.9 \
59
- # --max-model-len 200
60
-
61
-
62
  # Execute the command
63
  echo "Running command: $CMD"
64
  exec $CMD
 
2
 
3
  # Default values
4
  MODEL=${MODEL:-"microsoft/Phi-3-mini-4k-instruct"}
 
5
  DTYPE=${DTYPE:-"half"}
6
  MAX_NUM_BATCHED_TOKENS=${MAX_NUM_BATCHED_TOKENS:-512}
7
  MAX_NUM_SEQS=${MAX_NUM_SEQS:-16}
 
12
  # Disable usage stats via environment variable
13
  export VLLM_DISABLE_USAGE_STATS=true
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  # Check and set permissions for directories
16
+ for dir in /tmp/huggingface /tmp/cache /tmp/numba_cache /tmp/outlines_cache /.config /tmp/config; do
17
  if [ ! -d "$dir" ]; then
18
  mkdir -p "$dir"
19
  fi
 
37
  CMD="$CMD --enforce-eager"
38
  fi
39
 
 
 
 
 
 
 
 
40
  # Execute the command
41
  echo "Running command: $CMD"
42
  exec $CMD