diff --git a/.gitignore b/.gitignore index c84d1ef..9595164 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ venv/** **/**.log **/**.pid **.so +**.DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6a82cd8..68e3197 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use an official Python runtime as a parent image -FROM python:3.8-slim +FROM python:3.9-slim # Set the working directory to /app WORKDIR /app @@ -7,18 +7,19 @@ WORKDIR /app # Copy the current directory contents into the container at /app COPY . /app +# Install essential tools and Python RUN apt-get update && \ apt-get install -y build-essential cmake gcc g++ - # Install any needed packages specified in requirements.txt -RUN pip install --no-cache-dir -r requirements.txt +RUN pip3 install --no-cache-dir --upgrade pip && \ + pip3 install --no-cache-dir -r requirements.txt # Make port 80 available to the world outside this container EXPOSE 8081 # Define environment variable -ENV NAME World +# ENV NAME World # Run app.py when the container launches -CMD ["python", "./server/websocket_server.py"] \ No newline at end of file +CMD ["python3", "./server/websocket_server.py"] diff --git a/README.md b/README.md index eeb2ad1..0700366 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,10 @@ $ supervisord -c supervisord.conf ## docker ``` -$docker build -t gpt_python_server . -$docker run -p 8081:8081 gpt_python_server +$docker build -t gpt_python_server:1.0 . +$docker run -p 8081:8081 gpt_python_server:1.0 + +// in case need to debug docker container $docker docker exec -it /bin/bash ```