-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protmpnn microservice #97
base: master
Are you sure you want to change the base?
Conversation
EXPOSE 8000 | ||
|
||
# Set the entrypoint to start the FastAPI app | ||
ENTRYPOINT ["uvicorn", "protmpnn.api:app", "--host", "0.0.0.0", "--port", "8000"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXPOSE 8000 | |
# Set the entrypoint to start the FastAPI app | |
ENTRYPOINT ["uvicorn", "protmpnn.api:app", "--host", "0.0.0.0", "--port", "8000"] | |
# Set the entrypoint to start the FastAPI app | |
ENTRYPOINT ["uvicorn", "protmpnn.api:app", "--host", "0.0.0.0"] |
Expose and --port can be added during docker run. Don't stick to it in Dockerfile
@@ -0,0 +1,29 @@ | |||
from __future__ import annotations | |||
|
|||
import dataclasses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import dataclasses | |
from pydantic.dataclasses import dataclass |
if os.path.exists(directory): | ||
# Remove all files and subdirectories in the directory | ||
for item in os.listdir(directory): | ||
item_path = os.path.join(directory, item) | ||
if os.path.isfile(item_path) or os.path.islink(item_path): | ||
os.unlink(item_path) # Remove files and links | ||
elif os.path.isdir(item_path): | ||
shutil.rmtree(item_path) # Recursively remove subdirectories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if os.path.exists(directory): | |
# Remove all files and subdirectories in the directory | |
for item in os.listdir(directory): | |
item_path = os.path.join(directory, item) | |
if os.path.isfile(item_path) or os.path.islink(item_path): | |
os.unlink(item_path) # Remove files and links | |
elif os.path.isdir(item_path): | |
shutil.rmtree(item_path) # Recursively remove subdirectories | |
shutil.rmtree(directory, ignore_errors=True) |
No description provided.