Skip to content

Commit

Permalink
Revert "Init new repo"
Browse files Browse the repository at this point in the history
This reverts commit 4d7a429.
  • Loading branch information
rudolphpienaar committed Jun 3, 2024
1 parent 2da0cea commit 6c6cddc
Show file tree
Hide file tree
Showing 33 changed files with 744 additions and 778 deletions.
29 changes: 12 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
#
# Dockerfile for pfchrs.
# Dockerfile for pfmdb.
#
# Build with
#
# docker build -t <name> .
#
# For example if building a local version, you could do:
#
# docker build --build-arg UID=$UID -t local/pfchrs .
# docker build --build-arg UID=$UID -t local/pfms .
#
# In the case of a proxy (located at say 10.41.13.4:3128), do:
#
# export PROXY="http://10.41.13.4:3128"
# docker build --build-arg http_proxy=${PROXY} --build-arg UID=$UID -t local/pfchrs .
# docker build --build-arg http_proxy=${PROXY} --build-arg UID=$UID -t local/pfmdb .
#
# To run an interactive shell inside this container, do:
#
# docker run -ti --entrypoint /bin/bash local/pfchrs
# docker run -ti --entrypoint /bin/bash local/pfmdb
#
# To pass an env var HOST_IP to the container, do:
#
# docker run -ti -e HOST_IP=$(ip route | grep -v docker | awk '{if(NF==11) print $9}') --entrypoint /bin/bash local/pfchrs
# docker run -ti -e HOST_IP=$(ip route | grep -v docker | awk '{if(NF==11) print $9}') --entrypoint /bin/bash local/pfmdb
#
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11-slim

LABEL DEVELOPMENT=" \
docker run --rm -it \
-p 2025:2025 \
-v $PWD/pfchrs:/app:ro local/pfchrs /start-reload.sh \
-p 2024:2024 \
-v $PWD/pfms:/app:ro local/pfms /start-reload.sh \
"

ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -37,18 +37,18 @@ COPY requirements.txt /tmp/requirements.txt
RUN pip install --upgrade pip
RUN pip install -U email-validator
RUN pip install -r /tmp/requirements.txt && rm -v /tmp/requirements.txt
RUN pip install tzlocal
RUN pip install ipython
# RUN pip install tzlocal
# RUN pip install ipython
# RUN pip install pydantic
# RUN pip install tabulate
# RUN pip install rich
COPY ./pfchrs /app
COPY ./pfms /app

RUN apt update && \
apt -y upgrade && \
apt-get install -y apt-transport-https && \
apt -y install ssh iputils-ping && \
apt -y install vim telnet netcat-traditional procps curl gcc
apt -y install vim telnet netcat-traditional procps

# Create the 'localuser' group with specified GID
RUN groupadd -g 1102 localuser
Expand All @@ -62,10 +62,5 @@ RUN echo '%localuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

USER localuser

# Get Rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
RUN /home/localuser/.cargo/bin/cargo install chrs

ENV PORT=2025
ENV PORT=2024
EXPOSE ${PORT}
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
version: '3.9'

services:
pfchrs:
pfms:
build:
context: .
dockerfile: Dockerfile
args:
UID: ${UID}
http_proxy: ${HTTP_PROXY}
image: local/pfchrs
container_name: pfchrs
image: local/pfms
container_name: pfms
volumes:
- ./pfchrs:/app
- ./pfms:/app
command: /start-reload.sh
environment:
MAX_WORKERS: 1
SESSION_USERNAME: localuser
ports:
- "2025:2025"
- "2024:2024"
networks:
local:
deploy:
resources:
# shm_size: 512M
shm_size: 512M
reservations:
devices:
- driver: nvidia
Expand Down
3 changes: 0 additions & 3 deletions pfchrs/ABOUT

This file was deleted.

1 change: 0 additions & 1 deletion pfchrs/VERSION

This file was deleted.

146 changes: 0 additions & 146 deletions pfchrs/config/settings.py

This file was deleted.

65 changes: 0 additions & 65 deletions pfchrs/controllers/credentialController.py

This file was deleted.

Loading

0 comments on commit 6c6cddc

Please sign in to comment.