-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdockerfile
More file actions
44 lines (33 loc) · 1.18 KB
/
dockerfile
File metadata and controls
44 lines (33 loc) · 1.18 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
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Install a suitable C compiler (in this case, gcc)
RUN apt-get update && apt-get install -y build-essential
# Copy the requirements.txt into the container at /app
COPY requirements.txt /app/
# Install dependencies using pip
RUN pip install -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . /app
# Expose the port that the app runs on
EXPOSE 5555
# Start FastAPI app and Celery worker when the container launches
CMD ["python", "run.py"]
#### COMANDS TO RUN ####
# docker build -t phr-chat .
# docker run -it -d --gpus all -p 5555:5555 phr-chat
###############################################
### For development, just getting a container and then installing manually, and run run.py using screen ###
# FROM python:3.9-slim
# WORKDIR /phr-mental-chat
# EXPOSE 5555
# CMD ["/bin/sh"]
### run using
#docker run -it -d --gpus all -p 5000:5000 phr-plutchik
################################################
#### RUNNING THE APP MANUALLY ####
# python run.py
## USING accelerated library
# accelerate config
# accelerate launch run.py