hunkim commited on
Commit
44190c7
·
1 Parent(s): 3f9165e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -4,6 +4,11 @@ FROM python:3.9
4
  # Set working directory
5
  WORKDIR /app
6
 
 
 
 
 
 
7
  # Install Elasticsearch
8
  RUN apt-get update && apt-get install -y wget && \
9
  wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.6.2-linux-x86_64.tar.gz && \
@@ -20,8 +25,6 @@ RUN echo "network.host: localhost" >> /usr/share/elasticsearch/config/elasticsea
20
  # Copy code
21
  COPY . .
22
 
23
- RUN which uvicorn
24
-
25
 
26
  # Run Elasticsearch and application
27
- CMD ["/bin/bash", "-c", "/usr/share/elasticsearch/bin/elasticsearch & $(which uvicorn) app:app --host 0.0.0.0 --port 7860"]
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Copy requirements file
8
+ COPY requirements.txt .
9
+
10
+ RUN pip3 install -r requirements.txt
11
+
12
  # Install Elasticsearch
13
  RUN apt-get update && apt-get install -y wget && \
14
  wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.6.2-linux-x86_64.tar.gz && \
 
25
  # Copy code
26
  COPY . .
27
 
 
 
28
 
29
  # Run Elasticsearch and application
30
+ CMD ["/bin/bash", "-c", "/usr/share/elasticsearch/bin/elasticsearch & uvicorn app:app --host 0.0.0.0 --port 7860"]