william4416 commited on
Commit
a80d66e
·
verified ·
1 Parent(s): 53b918a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9-slim-buster
3
+
4
+ # Set the working directory to /app
5
+ WORKDIR /app
6
+
7
+ # Copy the current directory contents into the container at /app
8
+ COPY . /app
9
+
10
+ # Upgrade pip and install Rust compiler and C compiler toolchain
11
+ RUN apt-get update && apt-get install -y curl build-essential && \
12
+ curl https://sh.rustup.rs -sSf | sh -s -- -y && \
13
+ export PATH="$HOME/.cargo/bin:$PATH" && \
14
+ pip install --no-cache-dir -U pip && \
15
+ pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Expose the port that the application will be running on
18
+ EXPOSE 8000
19
+
20
+ # Run the application using Gunicorn
21
+ CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]