-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (27 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
34 lines (27 loc) · 1.04 KB
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
# Use the official Ubuntu base image
FROM python:3.8-slim-buster
# Set the working directory inside the container
WORKDIR /app/
# Update the package lists and install necessary dependencies
RUN apt-get update && \
apt-get install -y python3 python3-pip
RUN apt-get install ffmpeg libsm6 libxext6 -y
# Copy the requirements file into the container at /app
COPY setup.py /app/
COPY init_setup.sh /app/
COPY requirements.txt /app/
# Install any needed packages specified in requirements.txt
# Copy the current directory contents into the container at /app
COPY files /app/files/
COPY sample_image_inputs_to_app /app/sample_image_inputs_to_app/
COPY components/ /app/components/
COPY app.py /app/
COPY templates /app/templates/
COPY test_results /app/test_results/
# COPY try.py /app/
# Make port 5000 available to the world outside this container
# EXPOSE 5000
RUN pip3 install --no-cache-dir -r requirements.txt
# Run app.py when the container launches
# CMD ["python3", "try.py"]
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--workers=4", "app:app"]