bikas commited on
Commit
32575f1
·
1 Parent(s): e118f0b

Visiting Card

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -6
Dockerfile CHANGED
@@ -1,10 +1,17 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-slim
 
 
 
 
 
 
 
3
 
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
7
- # Copy the rest of the working directory contents into the container at /app
8
  COPY . /app
9
 
10
  # Install any needed packages specified in requirements.txt
@@ -13,8 +20,8 @@ RUN pip install --no-cache-dir -r requirements.txt
13
  # Make port 7860 available to the world outside this container
14
  EXPOSE 7860
15
 
16
- # Define environment variable
17
- ENV FLASK_APP=app.py
18
 
19
  # Command to run the application
20
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
1
+ # Use the official Python image from the Docker Hub
2
+ FROM python:3.7.9-slim
3
+
4
+ # Upgrade pip to the latest version and install dependencies in one RUN command
5
+ RUN apt-get update && \
6
+ apt-get install -y git libgl1-mesa-glx libglib2.0-0 && \
7
+ python -m pip install --upgrade pip && \
8
+ apt-get clean && \
9
+ rm -rf /var/lib/apt/lists/*
10
 
11
  # Set the working directory in the container
12
  WORKDIR /app
13
 
14
+ # Copy the current directory contents into the container at /app
15
  COPY . /app
16
 
17
  # Install any needed packages specified in requirements.txt
 
20
  # Make port 7860 available to the world outside this container
21
  EXPOSE 7860
22
 
23
+ # Define environment variable (corrected the syntax for environment variable name and value)
24
+ # ENV FLASK_APP=app.py
25
 
26
  # Command to run the application
27
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]