MoritzLaurer HF staff commited on
Commit
14036b7
1 Parent(s): 10d4fb6

update dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -1
Dockerfile CHANGED
@@ -1,17 +1,28 @@
1
- FROM python:3.9-slim
 
2
 
 
3
  ENV PYTHONUNBUFFERED=1 \
4
  SHELL=/bin/bash
5
 
 
6
  WORKDIR /app
7
 
 
 
 
 
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
 
11
  COPY start_server.sh .
12
 
 
13
  RUN chmod +x start_server.sh
14
 
 
15
  EXPOSE 7860
16
 
 
17
  CMD ["./start_server.sh"]
 
1
+ # Use a lightweight Python image
2
+ FROM python:3.9
3
 
4
+ # Set environment variables
5
  ENV PYTHONUNBUFFERED=1 \
6
  SHELL=/bin/bash
7
 
8
+ # Set the working directory
9
  WORKDIR /app
10
 
11
+ # Install wget and any other dependencies
12
+ RUN apt-get update && apt-get install -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements.txt and install dependencies
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
+ # Copy the start_server.sh script into the container
19
  COPY start_server.sh .
20
 
21
+ # Make the script executable
22
  RUN chmod +x start_server.sh
23
 
24
+ # Expose the MLflow port
25
  EXPOSE 7860
26
 
27
+ # Set the command to run the start_server.sh script
28
  CMD ["./start_server.sh"]