-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_test
74 lines (52 loc) · 2.02 KB
/
Dockerfile_test
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
70
71
72
73
74
# Use official Python image from the DockerHub
FROM python:3.9
# Set working directory inside the container
WORKDIR /app
# Copy the requirements file to the container
COPY ./requirements.txt /app/requirements.txt
# Install the Python dependencies
RUN pip install --no-cache-dir -r /app/requirements.txt
# Copy everything to the container
# COPY . .
COPY ./main.py /app/main.py
COPY ./api_v1.py /app/api_v1.py
COPY ./utility_v1.py /app/utility_v1.py
# Add folders as data mount points
ADD data /code/data/
# ADD cred /code/cred/
# -----------------------------------------------
# -----------------------------------------------
# # Use official Python image from the DockerHub
# FROM python:3.9
# # Set working directory inside the container
# WORKDIR /app
# # -----------------------------------------------
# # Common apt commands
# # RUN apt update
# # Few necessary libraries on any Linux system
# # RUN apt-get install ffmpeg libsm6 libxext6 -y
# # RUN apt-get install poppler-utils -y
# # -----------------------------------------------
# # Common pip commands
# # RUN pip install --upgrade pip
# # RUN pip install python-multipart
# # -----------------------------------------------
# # Copy the requirements file to the container
# COPY ./requirements.txt /app/requirements.txt
# # Install the Python dependencies
# RUN pip install --no-cache-dir -r /app/requirements.txt
# # -----------------------------------------------
# # Copy everything to the container
# # COPY . .
# COPY ./api_v1.py /app/api_v1.py
# COPY ./utility_v1.py /app/utility_v1.py
# # -----------------------------------------------
# # Add folders as data mount points
# ADD data /code/data/
# # ADD cred /code/cred/
# # -----------------------------------------------
# # Alternative: If command is not provided in "docker-compose.yml" and "__main__" function is not defined in api script:
# # # Expose the port FastAPI will run on
# # EXPOSE 8000
# # # Command to run the FastAPI app using Uvicorn
# # CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]