-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (44 loc) · 1.56 KB
/
Dockerfile
File metadata and controls
60 lines (44 loc) · 1.56 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
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
# Use an official Python runtime as a parent image
FROM python:3.9.12
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
# COPY . /app
# COPY model /app/model
# Install any needed packages specified in requirements.txt
# RUN pip install --no-cache-dir -r requirements.txt
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY . .
# Make port 8083 available to the world outside this container
EXPOSE 8083
# Define environment variable
# ENV NAME World
# Run app.py when the container launches
CMD ["python", "main.py"]
########### Old ###########
# Start from a minimal NVIDIA CUDA base image
#FROM nvidia/cuda:12.2.0-base-ubuntu22.04
# Install Python 3.9 and other necessary packages
#RUN apt-get update && apt-get install -y python3.10 python3-tk && \
# ln -s /usr/bin/python3.10 /usr/local/bin/python3 && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*
# Install pip
#RUN apt-get update && \
# apt-get install -y curl && \
# curl https://bootstrap.pypa.io/get-pip.py | python3 && \
# apt-get remove -y curl && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
#WORKDIR /app
# Copy only the necessary files
#COPY requirements.txt .
#COPY . .
# Install any needed packages specified in requirements.txt
#RUN pip3 install --no-cache-dir -r requirements.txt
# Make port 8083 available to the world outside this container
#EXPOSE 8083
# Run main.py when the container launches
#CMD ["python3", "main.py"]