TU Computer-Aided Diagnosis for Chest X-Ray and Fundus Photography + OCT (Optical Coherence Tomography)
virtualenv and virtualenvwrapper provide a dedicated environment for each Django project you create. Install by typing
pip install virtualenvwrapper-win
Then create a virtual environment for your project:
mkvirtualenv myproject
If you start a new command prompt, you will need to activate the environment again using:
workon myproject
Linux (Tested on Ubuntu)
To install virtualenv, we will use the pip3 command, as shown below:
pip3 install virtualenv
virtualenv --version
While inside the django-apps directory, create your virtual environment. Let call it env.
virtualenv env
Activate the virtual environment with the following command:
. env/bin/activate
- Django 2.1
- PyTorch 0.2.0
To install dependency, type:
pip install django
conda install pytorch=0.2.0 cuda80 -c pytorch
pip install torchvision==0.1.9
conda install -c conda-forge scikit-image
pip install scikit-image seaborn
pip install sklearn
Change into the outer project directory, and run makemigrations to tell Django that you've made some changes to your models and that you'd like the changes to be stored as a migration.
python manage.py makemigrationsmigrate command that will run the migrations for you and manage your database schema automatically.
python manage.py migrateRun the following commands to start the server
python manage.py runserverTest on Django 2.1 Python 3.6
Follow this tutorial
Use the given requirements.txt or create one by typing
pip freeze > requirements.txt
To list all the libraries in the environment.
Next, install Docker compose following this link
Then, build and run the container with the command:
docker-compose up
If there is any error and you need to build the docker image again, type:
docker build -t tucad_web .
Finally, the web app for development should start at http://127.0.0.1:8000/