File size: 2,090 Bytes
35fa184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32575f1
8ed94ce
32575f1
 
 
 
636f8ae
32575f1
 
8df2f3a
 
 
 
636f8ae
 
2256321
3280f76
 
8df2f3a
35fa184
e0b9b7d
 
35fa184
636f8ae
 
 
8df2f3a
 
 
636f8ae
32575f1
8df2f3a
636f8ae
 
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# # Developer Bikas

# # Use the official Python image from the Docker Hub
# FROM python:3.10.0-slim-buster

# # Upgrade pip to the latest version and install dependencies in one RUN command
# RUN apt-get update && \
#     apt-get install -y git libgl1-mesa-glx libglib2.0-0 && \
#     python -m pip install --upgrade pip setuptools wheel && \
#     apt-get clean && \
#     rm -rf /var/lib/apt/lists/*

# # Set the working directory in the container
# WORKDIR /app

# # Copy requirements.txt into the container at /app
# COPY requirements.txt .

# # Install any needed packages specified in requirements.txt
# RUN pip install --no-cache-dir -r requirements.txt

# # Copy the current directory contents into the container at /app
# COPY . .

# # Make port 7860 available to the world outside this container
# EXPOSE 7860

# # Define environment variable (if needed)
# # ENV FLASK_APP=app.py

# # Command to run the application using Gunicorn
# CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]


# Use the official Python image from the Docker Hub
FROM python:3.10.0-slim-buster

# Upgrade pip to the latest version and install dependencies in one RUN command
RUN apt-get update && \
    apt-get install -y git libgl1-mesa-glx libglib2.0-0 && \
    python -m pip install --upgrade pip setuptools wheel && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Set the working directory in the container
WORKDIR /app

# Copy requirements.txt into the container at /app
COPY requirements.txt .

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Create a directory for output within the application directory
RUN mkdir -p /app/output && \
    chmod -R 777 /app/output  # Adjust permissions as needed

# Copy the current directory contents into the container at /app
COPY . .

# Make port 7860 available to the world outside this container
EXPOSE 7860

# Define environment variable (if needed)
# ENV FLASK_APP=app.py

# Command to run the application using Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]